コード例 #1
0
 def __update_partial_particles(self):
     from game_engine.game import Game
     self.__partial_particle_construction += (
         1 / Game.display_configuration().fps) * self.__emission_rate
     while self.__partial_particle_construction >= 1:
         Game.current_scene().add_actor(self.__construct_particle())
         self.__partial_particle_construction -= 1
コード例 #2
0
ファイル: shooter.py プロジェクト: jorchube/GameEngineShooter
def start():
    display_configuration = DisplayConfiguration(width_px=800,
                                                 height_px=600,
                                                 fps=60,
                                                 scaled=True)
    camera = Camera(Point3D(0, 0, -50), Rotation(0, 0, 0), 45, 0.1, 100)

    Game.initialize(display_configuration, camera, Scene1)

    SoundEffects.initialize()

    Game.current_scene().add_actor(Player())
    Game.run()
コード例 #3
0
ファイル: main.py プロジェクト: jorchube/GameEngine
def start_engine_poc():
    display_config = DisplayConfiguration(width_px=800,
                                          height_px=600,
                                          fps=60,
                                          scaled=True)
    camera = Camera(Point3D(0, 0, -50), Rotation(0, 0, 0), 45, 0.1, 100.0)
    initial_scene = scene.Scene
    Game.initialize(display_config, camera, initial_scene)
    __add_some_actors(Game.current_scene())
    Game.run()