Esempio n. 1
0
    public void GameOver(bool forced)
    {
        int g = GameOverCheck();

        if (g != -1 || forced)
        {
            isOver = true;
            if (g == 1)
            {
                Debug.Log("You Win");
            }
            else
            {
                Debug.Log("You Lost");
            }

            this.gameObject.SetActive(false);
            MidGameUI.SetActive(false);
            StartGameUI.SetActive(true);
            PauseGameUI.SetActive(false);
            camera.StartIt();
            camera.GameStart();
            isPaused = false;
        }
    }
Esempio n. 2
0
    void Start()
    {
        isOver         = true;
        Arrow          = GameObject.Find("PointArrow").GetComponent <ArrowAnimation>();
        ListCharacters = new List <Character>();
        TurnRotation   = new List <Turn>();
        var numPlayers = (int)Random.Range(2, 5);
        var numEnemies = (int)Random.Range(4, 9);

        board            = new Board(BoardSize, PlayerCount, EnemyCount);
        characterPerTeam = new int[2];
        PrintBoard();
        FillBoard();
        TurnCreation();
        aI            = new AI(board, this);
        aI.ChangeTurn = TurnRotation[index];
        camera        = Camera.main.GetComponent <StartMovement>();
        Reset();
        isOver = false;
        camera.GetTarget(currentTurn.culprit.Object);
        camera.GameStart();
    }