コード例 #1
0
ファイル: Aircraft.cs プロジェクト: xiaojunwa/SpacecraftGame
        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;
            }
        }
コード例 #2
0
 public AircraftXwing(SpaceGame game) : base(game)
 {
     weaponLaserGun = new WeaponLaserGun(game);
     Initialize();
 }