Exemplo n.º 1
0
 public eliteenemy(PointF startlocation, List <PointF> path) : base(startlocation, "images/enemy2.png", path)
 {
     movespeed = 300;
     maxhp     = 60;
     currhp    = maxhp;
     gun       = new machinegun(this);
     gun.startfiring();
     turnspeed = 360; //(degs/se)
 }
Exemplo n.º 2
0
        public void addpowerup(float x, float y, string weaponname)
        {
            PointF startlocation = new PointF(x, y);

            if (weaponname == "machinegun")
            {
                weapon  w = new machinegun(startlocation);
                powerup p = new weaponpowerup(startlocation, w);
                poweruplist.Add(p);
            }
            else if (weaponname == "tripleshot")
            {
                weapon  w = new tripleshot(startlocation);
                powerup p = new weaponpowerup(startlocation, w);
                poweruplist.Add(p);
            }
            else if (weaponname == "sniper")
            {
                weapon  w = new sniper(startlocation);
                powerup p = new weaponpowerup(startlocation, w);
                poweruplist.Add(p);
            }
            else if (weaponname == "pistol")
            {
                weapon  w = new pistol(startlocation);
                powerup p = new weaponpowerup(startlocation, w);
                poweruplist.Add(p);
            }
            else if (weaponname == "firstaidpowerup")
            {
                powerup p = new firstaidpowerup(startlocation);
                poweruplist.Add(p);
            }
            else if (weaponname == "superballgun")
            {
                weapon  w = new superballgun(startlocation);
                powerup p = new weaponpowerup(startlocation, w);
                poweruplist.Add(p);
            }
            else if (weaponname == "enemyspawner")
            {
                powerup p = new enemyspawner(startlocation);
                poweruplist.Add(p);
            }
        }