public virtual void AddPawn(PawnController InPawn, bool bInDoRearrange = false) { if (InPawn != null) { if (Pawns.Count == 1) { if (GetPawn().GetColor() != InPawn.GetColor()) { PawnController tempPawn = GetPawn(); RemovePawn(tempPawn); Band.AddPawn(tempPawn, true); } } Pawns.Add(InPawn); InPawn.SetParent(this); InPawn.SetOrder(Pawns.Count + 10); InPawn.SetGameManager(GameManager); if (bInDoRearrange) { Rearrange(); } } else { // error } }
protected void MovePawn(PawnsContainer InDestination, PawnController InPawn) { RemovePawn(InPawn); InDestination.AddPawn(InPawn, true); }