public static void PlayerEndTurn() { TacticsMove unit = turnTeam.Dequeue(); unit.move = 0; if (unit.attacking) { unit.countTurn += 1; unit.EndTurn(); } if (unit.spawn && unit.attacking) { unit.spawnTurn += 1; } //unit.move = 0; if (turnTeam.Count > 0) { StartTurn(); } else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
public static void EndTurn() { CurrentSelected.passedTurn = true; CurrentSelected.EndTurn(); if (TeamUnits.ContainsKey(CurrentTeam)) { foreach (TacticsMove unit in TeamUnits[CurrentTeam].ToArray()) { if (!unit.passedTurn) { CurrentSelected = unit; StartTurn(); return; } } } foreach (Actions action in CurrentSelected.charChar.ActionCost.Keys.ToArray()) { CurrentSelected.charChar.SetActionState(action, true); } NextTeam(); }
public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); unit.EndTurn(); if (turnTeam.Count > 0) { StartTurn(); } else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); unit.EndTurn(); //EndTurn de tacticsMove, no de TurnManager! (Solo pone el turno a False) if (turnTeam.Count > 0) // emepzamos turno de la siguiente unidad { StartTurn(); } else //si no queda nada, lo ponemos al final de la cola y empezamos el siguiente equipo { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
public void ForceEndTurn() { Debug.Log("FIN DE TURNO"); TacticsMove unit = turnTeam.Dequeue(); unit.EndTurn(); if (turnTeam.Count > 0) { StartTurn(); } else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); //InitTeamTurnQueue(); } }
//Der Zug ist vorbei, entweder nächster Spieler oder anderes Team ist dran public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); unit.EndTurn(); if (turnTeam.Count > 0) //Nächster Spieler { StartTurn(); } else //Teamwechsel { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
public static void EndTurn(TacticsMove unit) { unit.prioritySpeed += units.Count; unit.EndTurn(); if (unit.dead) { //do nothing } else { units.Enqueue(unit, unit.prioritySpeed); } if (units.Count > 0) { StartTurn(); } }
public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); Debug.Log("End of TURN declared by unit " + unit.name); unit.EndTurn(); Debug.Log("Number of team units waiting for TURN " + turnTeam.Count); if (turnTeam.Count > 0) { StartTurn(); } else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
public static void EndTurn(TacticsMove unit) { /*TacticsMove unit = turnTeam.Dequeue();*/ unit.prioritySpeed += units.Count; unit.EndTurn(); units.Enqueue(unit, unit.prioritySpeed); if (units.Count > 0) { StartTurn(); } /*else * { * string team = turnKey.Dequeue(); * //Debug.Log(team); * turnKey.Enqueue(team); * InitTeamTurnQueue(); * }*/ }
public static void EndTurn() { Debug.Log("Ending Turn"); TacticsMove unit = turnTeam.Dequeue(); unit.EndTurn(); //Next Player if (turnTeam.Count > 0) { StartTurn(); } //Next Team else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
private void Update() { if (endingTurn) { if (!enemyTurn) { //Gets here TurnManagerPun2.EndOfTurn = true; //Issue may be here tacticsMove = this.GetComponent <TacticsMove>(); tacticsMove.EndTurn(); //player.GetComponent(photonView).RPC("SendTurn", RpcTarget.Others, TurnManagerPun2.EndOfTurn); } } }
public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); //Debug.Log(unit.name); if (endedTurn == true) { foreach (TacticsMove u in turnTeam) { u.EndTurn(); } endedTurn = false; } unit.EndTurn(); if (unit.currentlySelected == true) { if (unit.CompareTag("Player")) { unit.currentlySelected = false; unit.GetComponent <PlayerMove>().SelectedClick(); } } if (turnTeam.Count > 0) { StartTurn(); } else { string team = turnKey.Dequeue(); turnKey.Enqueue(team); InitTeamTurnQueue(); } }
/// <summary> /// Ends the turn for current team and start turn for the other team /// </summary> public static void EndTurn() { TacticsMove unit = turnTeam.Dequeue(); unit.ResetAllTiles(); unit.EndTurn(); TacticsMove.changingTurn = true; if (!gameEnded) { if (turnTeam.Count > 0) { //yield return new WaitForSeconds(0.2f); turnManager.Invoke("StartTurn", 0.5f); } else // changing team turn { ++turnNumber; Debug.Log("turn n°" + turnNumber); string team = turnKey.Dequeue(); turnKey.Enqueue(team); if (turnKey.Peek() == "Player") { UIManager.ResetReachableByEnemyTiles(true); } if (!gameEnded && !turnManager.eventTriggered && turnTeam.Count == 0 && !DialogueManager.InDialogueMode()) { //InitTeamTurnQueue(); turnManager.newTurn = true; } } } }