private void Awake() { m_Singleton = this; foreach (var carnivoreType in m_DisabledTypes) { Debug.Log("Note that " + carnivoreType + " is disabled.", this); } }
public GameObject SpawnCarnivore(Vector3 pos, Quaternion rot, CarnivoreType type) { var carn = CarnivoreFactory.InstantiateCarnivore(pos, rot, type); carn.transform.SetParent(transform); NetworkServer.Spawn(carn.gameObject); if (!m_Carnivores.ContainsKey(type)) { m_Carnivores.Add(type, new HashSet <CarnivoreBase>()); } m_Carnivores[type].Add(carn); OctreeManager.Get(OctreeType.Carnivore).Add(carn.transform); return(carn.gameObject); }