Beispiel #1
0
        public void AddWeapon(int level, WeaponCode weaponCode, int SlotIndex)
        {
            switch (weaponCode)
            {
            case WeaponCode.LASER:
                WeaponLaserGun weaponLaserGun = new WeaponLaserGun(game);

                //weaponLaserGun.playerOwner = playerOwner;

                //weaponLaserGun.SetPosition(
                //    weaponSlot.slots.ElementAt(SlotIndex).slotPosition,
                //    weaponSlot.slots.ElementAt(SlotIndex).slotAngle);

                weaponLaserGun.relation    = Relation;
                weaponLaserGun.sourceGroup = sourceGroup;
                weaponLaserGun.Initialize();

                weaponSlot.slots.ElementAt(SlotIndex).weapon = weaponLaserGun;

                break;
            }
        }
Beispiel #2
0
 public AircraftXwing(SpaceGame game) : base(game)
 {
     weaponLaserGun = new WeaponLaserGun(game);
     Initialize();
 }