def game():
resources = os.path.join(os.getcwd(), '../')
controller = wargame.engine.init(resources)
# we need 2 images to display mouse over and mouse not over
red = Resources.colour_surface(200, 200, (255, 0, 0))
blue = Resources.colour_surface(200, 200, (0, 0, 255))
# we need a node
node = MouseOverNode(blue, red, pygame.Rect(220, 140, 200, 200))
# I add the node to a SCENE
scene = Scene([node])
# I add the scene to the ENGINE
controller.add_scene('start', scene)
# I tell the engine what scene to start and run the controller
controller.run('start')
评论列表
文章目录