Example #1
0
 def draw(self, occluded=False):
     """
     :Parameters:
       occluded : boolean
         whether or not this tree is occluded
     """
     Node.draw(self)
Example #2
0
 def draw(self, occluded=False):
     """
     :Parameters:
       occluded : boolean
         whether or not this tree is occluded
     """
     Node.draw(self)
Example #3
0
 def __init__(self, node_objects, *args, **kwargs):
     Node.__init__(self, *args, **kwargs)
     self.node_objects = node_objects
     self.left_child   = None
     self.right_child  = None
#import scenegraph
from scenegraph import Node, Canvas, Drawable
#import render
from process import DelayProcess, MoveProcess, ProcessList
import time

sg = Node()
canvas = Canvas(100, 20, sg, char='X')
bomberman = Drawable('!', sg)
sg.add_child(bomberman)
bomberman.move(10, 10)
bomb = Drawable('@', bomberman)
sg.add_child(bomb)
bomb.move(1, 0)
#rt = render.RenderThread(canvas)
#rt.start()

processes = ProcessList()

delay = DelayProcess(5)
move = MoveProcess(bomberman, (7,2), 3)
move_bomb = MoveProcess(bomb, (10,0), 2)
#explosion = BoomProcess(bomb)
delay.add_child(move)
move.add_child(move_bomb)

processes.attach_process(delay)

start = time.time()
while len(processes) > 0:
    now = time.time()
Example #5
0
 def __init__(self, node_objects, *args, **kwargs):
     Node.__init__(self, *args, **kwargs)
     self.node_objects = node_objects
     self.left_child = None
     self.right_child = None