Пример #1
0
 public Airplane(World world, State state, Game game, Renderer renderer, bool isPlayer, Airplane playerPlane, String name, String modelName)
     : base(game, renderer, isPlayer ? -1000 : 0)
 {
     IsPlayer = isPlayer;
     World = world;
     CurrentState = state;
     Name = name;
     ModelName = modelName;
     if (isPlayer)
         Commands = new PlayerAirplaneCommands(game.Input);
     else
         Commands = new ComputerAirplaneCommands();
     PhysicalModel = new AirplanePhysicalModel(this, Commands);
     Model = new ObjModel(renderer.DirectX.Device, "Airplane.obj", Renderer.TextureManager.Create("Metal.png"));
     if(!isPlayer && ConfigurationManager.Config.DisplayOverlay)
         game.Register(new AirplaneOverlay(game, renderer, this, playerPlane));
 }
Пример #2
0
 public Airplane(World world, State state, Game game, Renderer renderer, bool isPlayer, Airplane playerPlane, String name, String modelName)
     : base(game, renderer, isPlayer ? -1000 : 0)
 {
     IsPlayer     = isPlayer;
     World        = world;
     CurrentState = state;
     Name         = name;
     ModelName    = modelName;
     if (isPlayer)
     {
         Commands = new PlayerAirplaneCommands(game.Input);
     }
     else
     {
         Commands = new ComputerAirplaneCommands();
     }
     PhysicalModel = new AirplanePhysicalModel(this, Commands);
     Model         = new ObjModel(renderer.DirectX.Device, "Airplane.obj", Renderer.TextureManager.Create("Metal.png"));
     if (!isPlayer && ConfigurationManager.Config.DisplayOverlay)
     {
         game.Register(new AirplaneOverlay(game, renderer, this, playerPlane));
     }
 }