Exemple #1
0
    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);
    }
Exemple #2
0
    public void SpawnNewHoloPop(string config_name)
    {
        HoloPopConfig config = ConfigByName[config_name];

        HoloPop b = Instantiate(config.prefab).GetComponent <HoloPop>();

        b.transform.position = ChooseSpawnPosition();
        AddHoloPopToList(b);
    }
Exemple #3
0
 // 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);
 }
Exemple #4
0
 // 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);
 }
Exemple #5
0
 private void destroyLastHoloPopFromList(HoloPop HoloPop)
 {
     HoloPopList.Remove(HoloPop);
 }
Exemple #6
0
 private void AddHoloPopToList(HoloPop newHoloPop)
 {
     HoloPopList.Add(newHoloPop);
 }
Exemple #7
0
 private void RemoveHoloPop(HoloPop HoloPop)
 {
     HoloPopList.Remove(HoloPop);
 }