Exemplo n.º 1
0
    void Update()
    {
        /*Game Phases:
         *      - Player idle
         *      - Player choose weapon
         *      - Player shoot
         *      - Change turn
         *      (Repeat process until somone dies)
         */
        if (Input.GetKeyDown(KeyCode.P))
        {
            // check player, game will start when player press space
            playerMove();
            Debug.Log("Game started");
            //player1Turn = turnController.changeTurn;
            generatePlayers(2);
            turnController.Initialize(characters);
            turnController.GenerateTurnOrder();
            turnController.BeginTurn();
        }

        if (Input.GetKeyDown(KeyCode.A))
        {
            turnController.EndTurn();
            turnController.NextTurn();

            var player = turnController.WhoIsActive();
            if (player.GetComponent <Character>().isDead)
            {
                spawnController.SpawnPlayer(player);
            }

            turnController.BeginTurn();
        }
    }