public IEnumerator ChangePlayer() { HideEndTurnButton(); otherPlayerObjects = currentPlayerObjects; currentPlayerObjects = currentPlayerObjects == p1Objects ? p2Objects : p1Objects; suaVez.SetTrigger("VAI"); yield return(new WaitForSeconds(1.5f)); otherPlayerObjects.cam.gameObject.SetActive(false); currentPlayerObjects.cam.gameObject.SetActive(true); yield return(new WaitForSeconds(.3f)); foreach (var t in currentPlayerObjects.tokens) { t.Color = Token.TokenColor.Friendly; } foreach (var t in otherPlayerObjects.tokens) { t.Color = Token.TokenColor.Enemy; } suaVez.SetTrigger("DESCE"); yield return(new WaitForSeconds(.7f)); }
public void Start() { p1Objects.hand.frontendController = this; p2Objects.hand.frontendController = this; currentPlayerObjects = p1Objects; otherPlayerObjects = p2Objects; p1Objects.hand.playerObjects = p1Objects; p2Objects.hand.playerObjects = p2Objects; }