public bool CanUseForInitSpawn(eSpawnM_Teams a_UserTeam) { if (m_IsUseForInit && m_InitTeam == a_UserTeam && IsAvailable()) { return true; } return false; }
///<summary>Spawn the object (Player, PNJ, etc.) on a SpawnPoint that is set as Initialisation Spawn. Use to spawn object at a specific position the first time they appear in game.</summary> public void Spawn_InitGame(SpawnUser a_UserToSpawn) { if (!SpawnManager_IsInit(true)) { return; } eSpawnM_Teams userTeam = a_UserToSpawn.GetUserTeam(); for (int i = 0; i < m_Spawns.Count; i++) { if (m_Spawns[i].CanUseForInitSpawn(userTeam)) { a_UserToSpawn.transform.position = m_Spawns[i].transform.position; a_UserToSpawn.transform.rotation = m_Spawns[i].transform.rotation; a_UserToSpawn.transform.gameObject.SetActive(true); } } }
public static Color32 GetSpawnColor(eSpawnM_Teams aTeam) { return(GetSpawnColor((int)aTeam)); }
public void ChangeTeam(eSpawnM_Teams a_NewTeam) { m_UserTeam = a_NewTeam; }