Beispiel #1
0
    public static void ProvinceClicked(Province p, Player activePlayer)
    {
        if (attacker == null)
        {
            if (p.Player != activePlayer)
            {
                return;
            }

            if (p.CanAttack())
            {
                attacker = p;
            }
        }
        else
        {
            Battle(p);
        }
    }
Beispiel #2
0
    private static void Battle(Province other)
    {
        if (other.Player == attacker.Player)
        {
            attacker = other;
            return;
        }
        if (!attacker.CanAttack())
        {
            return;
        }
        if (!attacker.Neighbours(other))
        {
            return;
        }
        defender = other;

        // Create Battle Window and call Battle Done when damage is found (Action)
        PopUpController.Instance.StartBattle(attacker, other, FightDone);
    }