Ejemplo n.º 1
0
        public Ship(Game1 game)
            : base(game)
        {
            this.game = game;

            lastNodePos = Vector2.Zero;
            pos = new Vector3(90, 4.5f, 0);
            moveSpeed = 0;
            accel = 0.5f;
            maxSpeed = 0.2f;
            boostSpeed = 0.6f;
            direction = new Vector3(0, 0, -1);
            currentTurnSpeed = 0;
            maxTurnSpeed = MathHelper.PiOver4 / 30;

            boundingBox = new OOBB(pos, direction, 1.5f, 1.5f); // Need to be changed to be actual ship dimentions
            circleCol = new CircleCollider(pos, 0.75f);

            shipModel = new ShipModel(this, game);
            //shipModel = new ShipModel(game.Content.Load<Model>(@"Models/Enemies/Cubes/guncube"), this);
            skyboxModel = new SkyboxModel(game.Content.Load<Model>(@"Models/Misc/Skybox/skybox"), this);
            speedCyl = new SpeedCylModel(game.Content.Load<Model>(@"Models/Misc/speedCyl"), this, ((Game1)Game));
            rbowTun = new RainbowTunnelModel(game.Content.Load<Model>(@"Models/Misc/Rbow/rbowTun"), this, ((Game1)Game));

            game.modelManager.addObject(shipModel);
            game.modelManager.add(skyboxModel);
            game.modelManager.addObject(rbowTun);
            game.modelManager.addTransparent(speedCyl);

            weapons = new WeaponSystem(this, this.game);
            moneyManager = new MoneyManager(this.game);
            particles = new ShipParticleSystem(this.game, this);
            shipHealth = new ShipHealthSystem(this.game, this);

            game.Components.Add(weapons);
            game.Components.Add(moneyManager);
            game.Components.Add(particles);
            game.Components.Add(shipHealth);

            ((WeaponDrill)weapons.weapons.ElementAt(4)).dome.setShip(this);
            alive = true;
        }
Ejemplo n.º 2
0
 public void addTransparent(SpeedCylModel model)
 {
     speedCyl = model;
 }