Example #1
0
        public override void Initialize()
        {
            RegisterCommands();

            CanyonGame.Console.Trace("Loading map: " + this.mapname + "...");
            this.Components.Add(Terrain=new Terrain(Game, MapDirectory + "/" + this.mapname));

            this.Components.Add(this.player = new Player(this, Vector3.One * 30));
            this.Components.Add(new Display(Game, player));

            #if DEBUG
            this.Components.Add(new Grid(Game, (int)(CanyonGame.FarPlane / 20), 10, this.player));
            #endif

            if (this.mapname == "riemers")
            {
                this.Components.Add(new MarkerPath(this, Vector3.One * 30 + Vector3.Forward * 10, Vector3.Backward, 20));
                this.Components.Add(new SnowSystem(Game));
                PlumeSystem ps = new PlumeSystem(Game);
                this.Components.Add(ps);
                this.Components.Add(new PositionEmitter(Game, ps, new Vector3( 31.2f, 6.2f, 59.76f) ));
            }

            base.Initialize();
        }
Example #2
0
 public Display(Game game, Player p)
     : base(game)
 {
     this.Player = p;
     Items = new List<Item>();
     DrawOrder = 10;
 }
Example #3
0
 public RocketDeploy(GameScreen screen, Player player)
     : base(screen.Game)
 {
     this.Screen = screen;
     this.player = player;
     Screen.Game.Content.Load<Model>("Models/rocket");//preload;
     this.state = DeployState.Waiting;
 }