Ejemplo n.º 1
0
 public void                     SpawnNow()
 {
     if (this._prefab)
     {
         GoPool.Spawn(this._prefab, this.transform.position, this.transform.rotation, this._parent ? this._parent : this._parentVar?.Transform);
     }
 }
Ejemplo n.º 2
0
 void                            OnDestroy()
 {
     if (_instance == null)
     {
         _instance = null;
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 3
0
 void                            Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else if (_instance != this)
     {
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 4
0
 public void     DespawnNow()
 {
     GoPool.Despawn(this.gameObject);
 }