Exemplo n.º 1
0
    public static HalfShield Factory(int cellID)
    {
        HalfShield shield = HalfShield.Factory();

        shield.Cell = Cell.FromId(cellID);
        return(shield);
    }
Exemplo n.º 2
0
    private void UseShield()
    {
        if (lastLoss != 0)
        {
            shield.interactable = false;

            if (isDead)
            {
                hero.setWP(lastLoss);

                isDead               = false;
                fight.fightOver      = false;
                fight.ResultMsg.text = "";
                fight.fighters.Add(this);
                fight.newRoundBtn.interactable = true;

                transform.Find("Image").gameObject.SetActive(true);
                transform.Find("RIP").gameObject.SetActive(false);
            }
            else
            {
                hero.setWP(hero.Willpower + lastLoss);
            }

            if (shieldToken is HalfShield)
            {
                hero.heroInventory.RemoveBigToken(shieldToken);
            }
            else
            {
                HalfShield hs = HalfShield.Factory();
                hero.heroInventory.ReplaceBigToken(shieldToken, hs, true);
            }
        }
    }
Exemplo n.º 3
0
    public override void UseEffect()
    {
        BigToken bigToken = GameManager.instance.MainHero.heroInventory.bigToken;

        if (!bigToken is Shield || bigToken.GetComponent <PhotonView>().ViewID != GetComponent <PhotonView>().ViewID)
        {
            return;
        }

        HalfShield shield = HalfShield.Factory();

        GameManager.instance.MainHero.heroInventory.ReplaceBigToken((BigToken)this, shield, true);
    }