Esempio n. 1
0
    public override void Init(bool defaultStats = false)
    {
        base.Init(defaultStats);

        if (defaultStats)
        {
            maxHealth     = 10;
            health        = 10;
            defense       = 4;
            physAtk       = 5;
            energyAtk     = 10;
            speed         = 4;
            movementRange = 4;


            // WEAPON(S):
            weapons = new List <Weapon>();

            Weapon beamsword = new BeamSword(this);
            weapons.Add(beamsword);
            Equip(beamsword);
            Weapon rifle = new Rifle(this);
            weapons.Add(rifle);
            Equip(rifle);
            Weapon sniper = new SniperRifle(this);
            //weapons.Add(sniper);
            //Equip(sniper);
            //weapons.Add(new LaserCannon(this));
            //weapons.Add(new PhotonEqualizer(this));
            //weapons.Add(new EnergyChain(this));
        }

        UpdateStats();
    }
        public ConcreteMediator()
        {
            minigun      = new Minigun(this);
            assaultRifle = new AssaultRifle(this);
            flamethrower = new Flamethrower(this);
            shotgun      = new Shotgun(this);
            sniperRifle  = new SniperRifle(this);

            assaultRifleGreen = new AssaultRifle(this);
            new GreenLaser(assaultRifleGreen, this);
            assaultRifleRed = new AssaultRifle(this);
            new RedLaser(assaultRifleRed, this);

            sniperRifleGreen = new SniperRifle(this);
            new GreenLaser(sniperRifleGreen, this);
            sniperRifleRed = new SniperRifle(this);
            new RedLaser(sniperRifleRed, this);

            weaponsList = new List <Weapon>();
            weaponsList.Add(minigun);
            weaponsList.Add(assaultRifle);
            weaponsList.Add(flamethrower);
            weaponsList.Add(shotgun);
            weaponsList.Add(sniperRifle);
            weaponsList.Add(assaultRifleGreen);
            weaponsList.Add(assaultRifleRed);
            weaponsList.Add(sniperRifleGreen);
            weaponsList.Add(sniperRifleRed);
        }
Esempio n. 3
0
        public Pickupable GetPickupable()
        {
            int    num = GameState.GetInstance().Random.Next(8);
            Weapon spawn;

            switch (num)
            {
            case 0:
                spawn = new Minigun(GameApplication.GetInstance().mediator);
                break;

            case 1:
                spawn = new SniperRifle(GameApplication.GetInstance().mediator);
                break;

            case 2:
                spawn = new Flamethrower(GameApplication.GetInstance().mediator);
                break;

            case 3:
                spawn = new Shotgun(GameApplication.GetInstance().mediator);
                break;

            // Weapons with laser
            case 4:
                spawn = new SniperRifle(GameApplication.GetInstance().mediator);
                new RedLaser(spawn, GameApplication.GetInstance().mediator);
                break;

            case 5:
                spawn = new AssaultRifle(GameApplication.GetInstance().mediator);
                new RedLaser(spawn, GameApplication.GetInstance().mediator);
                break;

            case 6:
                spawn = new SniperRifle(GameApplication.GetInstance().mediator);
                new GreenLaser(spawn, GameApplication.GetInstance().mediator);
                break;

            case 7:
                spawn = new AssaultRifle(GameApplication.GetInstance().mediator);
                new GreenLaser(spawn, GameApplication.GetInstance().mediator);
                break;

            default:
                spawn = new AssaultRifle(GameApplication.GetInstance().mediator);
                break;
            }
            return(spawn);
        }
Esempio n. 4
0
        public void SetupWeapons()
        {
            weapons    = new BaseGun[5];
            weapons[0] = new Pistol();
            Globals.gameInstance.sceneGraph.Setup(weapons[0].mesh);
            weapons[1] = new Shotgun();
            Globals.gameInstance.sceneGraph.Setup(weapons[1].mesh);
            weapons[2] = new AssaultRifle();
            Globals.gameInstance.sceneGraph.Setup(weapons[2].mesh);
            weapons[3] = new SniperRifle();
            Globals.gameInstance.sceneGraph.Setup(weapons[3].mesh);
            weapons[4] = new Sword();
            Globals.gameInstance.sceneGraph.Setup(weapons[4].mesh);

            currentWeapon = -1;
        }
Esempio n. 5
0
 public Sniper()
 {
     _weapon1    = new SniperRifle();
     _weapon2    = new NailGun();
     _weapon3    = new Axe();
     _weapon4    = null;
     _gren1      = Ammunition.FragGrenade;
     _gren2      = Ammunition.Flare;
     _health     = 85;
     _armour     = 50;
     _maxShells  = 75;
     _maxNails   = 50;
     _maxRockets = 50;
     _maxCells   = 50;
     _maxGren1   = 4;
     _maxGren2   = 4;
 }