/// <summary>
        /// A utility function for setting up the default weapon on this ship
        /// </summary>
        private void AddDefaultWeapon()
        {
            CardData       defaultWeaponCardData = AssetManager.GetData <CardData>(WeaponCard.DefaultWeaponCardDataAsset);
            CardWeaponPair defaultWeapon         = AddChild(new CardWeaponPair(defaultWeaponCardData.CreateCard(Card.Player) as WeaponCard), true, true);

            defaultWeapon.AddToCardShipPair(this);
        }
Exemple #2
0
        /// <summary>
        /// The callback for our ability - this can only happen once per turn
        /// </summary>
        private void PerformAbility(BaseObject clickedObject)
        {
            if (IsPlaced)
            {
                CardWeaponPair cardWeaponPair = GetCardObjectPair <CardWeaponPair>();

                cardWeaponPair.Turret.ShotsLeft++;
                ScreenManager.Instance.GetCurrentScreenAs <BattleScreen>().ActivePlayer.AlterResources(ResourceType.Fuel, 1, ChargeType.kCharge);

                AbilityPerformed = true;
            }
        }
 public WeaponInfoImage(CardWeaponPair cardWeaponPair, Vector2 size, Vector2 localPosition) :
     base(size, localPosition, cardWeaponPair.Card.TextureAsset)
 {
     CardWeaponPair = cardWeaponPair;
 }