/// <summary>
 ///     Fires after all injections satisifed.
 ///     Override and place your Actor/Director relationship initialization code here
 /// </summary>
 public virtual void OnRegister(IActor actor)
 {
     ///Beware, never try here to access other Director via Actor.GetDirectorComponent<T>() method, we're not sur
     /// other GameObject actor component have been awake (and bind to a Director) or not
     ///Example :  myItemDirector = Actor.GetDirectorComponent<IItemDirector>();
     Actor = actor;
     if (ContextView.hasAlreadyStart())
     {
         Start();
     }
 }
Ejemplo n.º 2
0
 public void PostConstruct()
 {
     if (ContextView.hasAlreadyStart())
     {
         WarmUp();
         Start();
     }
     else
     {
         WarmupSignal.AddOnce(WarmUp);
         StartSignal.AddOnce(Start);
     }
 }
 public virtual void PostConstruct()
 {
     if (ContextView.hasAlreadyStart())
     {
         WarmUp();
         //Dans cette situation on n'execute le StartUp que sur la fin sur le onRegister pour permettre aux implementations
         // de StartUp de faire reference à l'acteur du directeur.
     }
     else
     {
         WarmupSignal.AddOnce(WarmUp);
         StartSignal.AddOnce(Start);
     }
 }