Ejemplo n.º 1
0
 /// <summary>
 /// Register itsself with KGFAccessor
 /// -> do not override, use KGFAwake() instead
 /// </summary>
 protected virtual void Awake()
 {
     KGFAccessor.AddKGFObject(this);
     EventOnAwake.Trigger(this);
     // call own KGFAwake, so user is not able to change our own basic Awake() behaviour
     KGFAwake();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Un-Register itsself with KGFAccessor
 /// </summary>
 void OnDestroy()
 {
     EventOnDestroy.Trigger(this);
     KGFAccessor.RemoveKGFObject(this);
     KGFDestroy();
 }