public void MakeHoloPop() { HoloPop b = Instantiate(HoloPopPrefab).GetComponent <HoloPop>(); b.transform.position = new Vector3(0, 0, 2); // choose 2 on z so its in front of the camera AddHoloPop(b); }
public void SpawnNewHoloPop(string config_name) { HoloPopConfig config = ConfigByName[config_name]; HoloPop b = Instantiate(config.prefab).GetComponent <HoloPop>(); b.transform.position = ChooseSpawnPosition(); AddHoloPopToList(b); }
// destroy the last HoloPop in the list public bool DestroyHoloPop() { if (HoloPopList.Count > 0) { HoloPop b = HoloPopList[HoloPopList.Count - 1]; RemoveHoloPop(b); DestroyObject(b.gameObject); return(true); } return(false); }
// destroy the last HoloPop in the list public bool DestroyLastHoloPop() { if (HoloPopList.Count > 0) { HoloPop b = HoloPopList[HoloPopList.Count - 1]; destroyLastHoloPopFromList(b); DestroyObject(b.gameObject); // reset the gaze just in case Managers.Gaze.ClearHits(); return(true); } return(false); }
private void destroyLastHoloPopFromList(HoloPop HoloPop) { HoloPopList.Remove(HoloPop); }
private void AddHoloPopToList(HoloPop newHoloPop) { HoloPopList.Add(newHoloPop); }
private void RemoveHoloPop(HoloPop HoloPop) { HoloPopList.Remove(HoloPop); }