public void RecruitCharacter() { Character recruitedCharacter = recruitableCharacter; HexGridController.SpawnCharacterForPlayerCrew(recruitedCharacter); recruitableCharacter = null; OnHarborChanged?.Invoke(this); }
//Creates a player from a prefab and spawns a ship, starting characters and adds them to controllers private void CreateHumanPlayer() { Ship newShip = Instantiate(playerStarterShip); newShip.transform.SetParent(shipTransform); worldGrid.AddUnit(newShip, worldController.PlayerSpawnPosition, HexDirectionExtension.ReturnRandomDirection(), true); combatSystem.managementMap = playerStartingGridMap; Player newPlayer = new Player(newShip, true, playerCrewSimulation); MapTurnSystem.instance.AddPlayerToFirstPositionInTurnOrder(newPlayer); HexGridController.player = newPlayer; newPlayer.PlayerData.NextBountyChange = setupData.difficultySettings.bountyChanges; for (int i = 0; i < startingCharacters.Length; i++) { HexGridController.SpawnCharacterForPlayerCrew(startingCharacters[i]); } OnPlayerCreated?.Invoke(newPlayer); }