示例#1
0
    def __init__(self, app):
        GameScreen.__init__(self, app)

        LoadFontFace("menus/Delicious-Roman.otf")

        self.region = RocketRegion.make('pandaRocket', self.app.win)
        self.region.setActive(1)
        context = self.region.getContext()

        self.menu = context.LoadDocument('menus/main_menu.rml')
        self.menu.hook = self
示例#2
0
	def __init__(self, control_manager, player):
		GameScreen.__init__(self, control_manager)
		self.width, self.height = WIN_WIDTH, WIN_HEIGHT
		self.bg = Surface((WIN_WIDTH, WIN_HEIGHT))
		self.player = player
		self.ui_font = font.Font("./fonts/FreeSansBold.ttf", 16)
		self.small_font = font.Font("./fonts/FreeSansBold.ttf", 12)
		self.main_options_index = 0
		self.equipment_party_index = 0
		self.equipment_slot_index = 0
		self.equipment_item_index = 0
		self.equipment_page_index = 0
		self.mode = MAIN
示例#3
0
	def __init__(self, control_manager, player, monsters, tile, battle_data = None):
		GameScreen.__init__(self, control_manager)
		self.width, self.height = WIN_WIDTH, WIN_HEIGHT
		self.player = player
		self.monsters = monsters
		self.init_active_party()
		self.assign_monster_letters()
		self.generate_rewards()
		self.bg = self.generate_bg(tile)
		self.ui_font = font.Font("./fonts/FreeSansBold.ttf", 16)
		self.mode = SELECT_ACTION
		self.action_index = 0
		self.target_index = 0
		self.item_select_index = 0
		self.spell_index_x, self.spell_index_y = 0, 0
		self.pending_action = None
		self.spell_queue = []
		self.turn_manager = TurnManager(self)
		self.misc_message = None
		self.victory_flag = False
		self.battle_data = battle_data
示例#4
0
    def __init__(self, app):

        GameScreen.__init__(self, app)

        utilities.setApp(self.app)

        self.world = World(10)

        self.app.taskMgr.add(self.update, "update")

        self.app.accept("a", self.world.player.moveLeft, [True])
        self.app.accept("a-up", self.world.player.moveLeft, [False])

        self.app.accept("d", self.world.player.moveRight, [True])
        self.app.accept("d-up", self.world.player.moveRight, [False])

        self.app.accept("space", self.world.player.jump, [True])
        self.app.accept("space-up", self.world.player.jump, [False])

        self.app.accept("c", self.world.player.crouch, [True])
        self.app.accept("c-up", self.world.player.crouch, [False])

        self.app.accept("mouse1", self.world.player.activate, [])

        self.app.accept("escape", sys.exit, [])

        #self.app.accept("h", self.showDBG, [True])
        #self.app.accept("h-up", self.showDBG, [False])

        self.prevTime = 0

        self.app.mousePos = Point2()
        self.app.disableMouse()


        self.app.rl = base.camLens.makeCopy()