示例#1
0
 public bool CanUseForInitSpawn(eSpawnM_Teams a_UserTeam)
 {
     if (m_IsUseForInit && m_InitTeam == a_UserTeam && IsAvailable())
     {
         return true;
     }
     return false;
 }
示例#2
0
        ///<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);
                }
            }
        }
示例#3
0
 public static Color32 GetSpawnColor(eSpawnM_Teams aTeam)
 {
     return(GetSpawnColor((int)aTeam));
 }
示例#4
0
 public void ChangeTeam(eSpawnM_Teams a_NewTeam)
 {
     m_UserTeam = a_NewTeam;
 }