{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/efb9b898397480dd5b58e5aa8bfecb8d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"efb9b898397480dd5b58e5aa8bfecb8d","url":"https://api.github.com/users/PKrawczynski","login":"PKrawczynski","id":1142917},"milestone":null,"assignee":null,"updated_at":"2011-11-08T14:51:49Z","labels":[],"comments":0,"closed_at":null,"url":"https://api.github.com/repos/alecmce/xember/issues/18","body":"Hi, first of all I was thinking about that problem for a few days and tried different approaches but none was really satisfying. \r\n\r\nReal life example. Im having systems that are responsible for:\r\n-collision\r\n-calculating velocity/gravity\r\n-animating object\r\n-rendering object\r\n-logic (searching for enemies, regenerating hp etc)\r\n\r\nFor example, player is falling down from a platform so he gains velocity, because of time and gravity variables that are responsible for calculating it. Then he suddenly hits bottom platform, and polygons are separated but this is the point where im having a problem - right now velocity components MUST be informed that time of fall should be set to 0 and forces should be set to 0 as well. Also animation component must be requested to discontinue animating current display object and instead to show \"hit\" or \"fell\" animation. Last but not least - logic component must know that player hit ground so it will be possible once again for him to use \"jump\" action.\r\n\r\nHow can I achieve all of that without sensless coupling and injecting components into nodes/systems that should not ever have access to it. I thought about some \"state\" component but how should it work? how should i notify about continous state for example \"falling\" and about one-shot type of state \"just fell.\" \r\n\r\nThats only really big architecture problem so far for me with xember.\r\n\r\nBest Regards,\r\nPawel.","html_url":"https://github.com/alecmce/xember/issues/18","number":18,"title":"Responding to \"events\" ","id":2174940,"created_at":"2011-11-08T14:51:49Z"},"action":"opened"}