Esempio n. 1
0
    //Function to switch to player turn.
    public void StartPlayerTurn()
    {
        //Sets current turn to player
        currentTurn = TurnOwner.Player;

        //Updates bool in Player Camera to true.
        playerCamera.IsPlayerTurn = true;

        //Sets the current character to first character.
        // ** NEED TO CHANGE THIS TO CHECK FOR ALIVE CHARACTERS ONCE STAT SHEET IS DONE.
        currentPCIndex = 0;
        currentPC      = pcList[0];

        //Sets the first PC to active state.
        moveScript = currentPC.GetComponent <MoveToClickPoint>();
        moveScript.SetCharacterActive();

        //Function in player camera to snap to first index character.
        playerCamera.StartNewTurn();
    }
Esempio n. 2
0
    //Function to switch to player turn.
    public void StartPlayerTurn()
    {
        //Sets current turn to player
        currentTurn = TurnOwner.Player;

        //Updates bool in Player Camera to true.
        playerCamera.IsPlayerTurn = true;

        //Sets the current character to first character.
        // ** NEED TO CHANGE THIS TO CHECK FOR ALIVE CHARACTERS ONCE STAT SHEET IS DONE.
        currentPCIndex = 0;
        currentPC      = pcList[0];

        // Checks for death state.
        playerCharTemp = currentPC.GetComponent <CharacterTemplate>();

        while (playerCharTemp.isDead == true)
        {
            // ** BUG ** DEAD GUY STILL GETS SELECTED;
            // ** NEED TO CHECK LOSE CONDITION HERE **
            currentPCIndex++;
            if (currentPCIndex == pcList.Length)
            {
                currentPCIndex = 0;
            }
            currentPC      = pcList[currentPCIndex];
            playerCharTemp = currentPC.GetComponent <CharacterTemplate>();
        }


        //Sets the first PC to active state.
        moveScript = currentPC.GetComponent <MoveToClickPoint>();
        moveScript.SetCharacterActive();

        //Function in player camera to snap to first index character.
        playerCamera.StartNewTurn();
    }