Beispiel #1
0
    def setup(self):
        'to be called after window is initialized'
        import resource
        resource.init(self)
        import asteroid
        import creatures
        
        self.init_skybox()
        self.init_ui()
        self.taskMgr.add(self.camera_task, "cameraTask")
        self.asteroid = asteroid.Asteroid.make_spheroid(asteroid.Rock, 12)
        asteroid.tunnel(self.asteroid)
        self.asteroid.nodepath.reparentTo(self.render)

        self.creatures = sum([[c() for i in range(5)] 
            for c in (creatures.Human, creatures.Robot)], []) 
        for creature in self.creatures:
            creature.pos = (0, 0, 0)
            creature.nodepath.reparentTo(self.render)

        self.start()
        self.setFrameRateMeter(True)
 
    -> Added Missile Counter (Collectable Item)
    -> Added bouncer missile item on screen every now and then
    -> Added missile counter check in update
    -> Added life counter check in update
    
"""

""" Import and Initialize """
import pygame, utility, sys, random, resource
from resource import *


pygame.init()
utility.init()
resource.init()

""" Read configuration file """
utility.set_config_file(CONFIG_DIRECTORY)
    
width = int(utility.get_config_value('width', 800))
height = int(utility.get_config_value('height', 600))
title = utility.get_config_value('title', 'War Thunder by Justin Hellsten')
depth = int(utility.get_config_value('depth', 32))
mode = int(utility.get_config_value('mode', 0))

if not pygame.display.get_init():
    print 'Could not initialize display screen'
    sys.exit()

#Check if depth is okay for display mode
Beispiel #3
0
def init(pgConn, schema):
    ckanPackageQuery.init(pgConn, schema)
    ckanResourceQuery.init(pgConn)