private void StartPlaceCharacters() { turnMgr = TurnManager.Instance; turnMgr.Init(); turnMgr.AssignGridManager(this); ActiveCharsGO = new List <GameObject>(); AllCharsGO = new List <GameObject>(); bool teamOne = true; int charNum = 1; // This list, populated manually in inspector, determines how many dinos to spawn and what their positions will be. foreach (Vector2Int pos in charStartingPositions) { GameObject currentCharGO; TurnCharacter currentChar; // Spawn a dino on a team, alternating which team's dino to spawn with a bool. Also create an abstracted "character" in the turn manager if (teamOne) { currentCharGO = Instantiate(characterOnePrefab, GetNodeContainer(GetNode(pos.x, pos.y)).gameObject.transform.position, Quaternion.identity); currentChar = turnMgr.CreateActiveCharacter(1, currentCharGO); } else { currentCharGO = Instantiate(characterTwoPrefab, GetNodeContainer(GetNode(pos.x, pos.y)).gameObject.transform.position, Quaternion.identity); currentChar = turnMgr.CreateActiveCharacter(2, currentCharGO); } CharacterGridMovement currentCharGridMov = currentCharGO.GetComponent <CharacterGridMovement>(); currentCharGridMov.GridPosX = pos.x; currentCharGridMov.GridPosZ = pos.y; currentCharGridMov.SetCurrentNode(); currentCharGO.GetComponent <UnityCharacterTurnInfo>().CharacterNumber = charNum; if (!teamOne) { charNum++; // Increment character number after we've given the current number to both sides } ActiveCharsGO.Add(currentCharGO); // Add to list for public reference AllCharsGO.Add(currentCharGO); teamOne = !teamOne; // Alternate teams } // Get the ball rolling and start index 0's turn after we're done building the lists turnMgr.StartTurnByNumber(0); }