Ejemplo n.º 1
0
 protected void Start()
 {
     //singleton pattern
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.Log(this + " singleton  already created. Exterminating..");
         Destroy(this);
     }
     hideable = GetComponent <IHideable>();
     Hide();
     animator = GetComponent <Animator>();
 }
Ejemplo n.º 2
0
 protected void Start()
 {
     Instance = this;
     //todo add check for multiple objects with that script
     animator = GetComponent <Animator>();
 }