Beispiel #1
0
    private bool CheckGameEnd()
    {
        switch (vc.CheckVectory(Units))
        {
        case 0:
            break;

        case 1:
            Win();
            if (GameEnded != null)
            {
                GameEnded.Invoke(this, new EventArgs());
            }
            return(true);

        case 2:
            Lose();
            if (GameEnded != null)
            {
                GameEnded.Invoke(this, new EventArgs());
            }
            return(true);
        }
        return(false);
    }
Beispiel #2
0
    private bool CheckGameEnd()
    {
        switch (vc.CheckVectory(Units))
        {
        case 0:
            break;

        case 1:
            StartCoroutine(OnGameEnded(true));
            return(true);

        case 2:
            StartCoroutine(OnGameEnded(false));
            return(true);
        }
        return(false);
    }