Browse Source

gbe.nodes.Node given 'hidden' methods intended to be used by astate machine. This, in effect, makes a Node tree the core of a game state machine

master
Bryan Miller 6 years ago
parent
commit
8435bfa423
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      game/gbe/nodes.py

+ 17
- 0
game/gbe/nodes.py View File

return c return c
return None return None


def _init(self):
if hasattr(self, "on_init"):
self.on_init()
for c in self._NODE_DATA["children"]:
c._init()

def _close(self):
if hasattr(self, "on_close"):
self.on_close()
for c in self._NODE_DATA["children"]:
c._close()

def _pause(self):
if hasattr(self, "on_pause"):
self.on_pause()
for c in self._NODE_DATA["children"]:
c._pause()


def _update(self, dt): def _update(self, dt):
if hasattr(self, "on_update"): if hasattr(self, "on_update"):

Loading…
Cancel
Save