Exemplo n.º 1
0
    /// <summary>
    /// Unity's Awake.
    /// </summary>
    protected override void Awake()
    {
        base.Awake();
        isHuman = false;

        realPlayer = FindObjectOfType <DemoHumanPlayer>();
    }
Exemplo n.º 2
0
    public virtual bool CanBePlayed(DemoHumanPlayer owner)
    {
        switch (statId)
        {
        case 0:
            return(owner.isActivePlayer && owner.castleStat.effectiveValue >= manaCost);

        case 1:
            return(owner.isActivePlayer && owner.defenseStat.effectiveValue >= manaCost);

        case 2:
            return(owner.isActivePlayer && owner.workersStat.effectiveValue >= manaCost);

        case 3:
            return(owner.isActivePlayer && owner.bricksStat.effectiveValue >= manaCost);

        case 4:
            return(owner.isActivePlayer && owner.soldiersStat.effectiveValue >= manaCost);

        case 5:
            return(owner.isActivePlayer && owner.weaponStat.effectiveValue >= manaCost);

        case 6:
            return(owner.isActivePlayer && owner.magicStat.effectiveValue >= manaCost);

        case 7:
            return(owner.isActivePlayer && owner.crystalsStat.effectiveValue >= manaCost);

        case 8:
            return(owner.isActivePlayer && owner.genhpStat.effectiveValue >= manaCost);

        default:
            return(false);
        }
    }
Exemplo n.º 3
0
 public virtual bool CanBePlayed(DemoHumanPlayer owner)
 {
     return(owner.isActivePlayer && owner.manaStat.effectiveValue >= manaCost);
 }