Esempio n. 1
0
 public T GetBehaviorThatImplementsType <T>() where T : class
 {
     if (mComponents.ContainsKey(ActorComponent.ComponentType.Behavior))
     {
         BehaviorComponent bc = mComponents[ActorComponent.ComponentType.Behavior] as BehaviorComponent;
         return(bc.GetBehaviorThatImplementsType <T>());
     }
     return(null);
 }
Esempio n. 2
0
 public T GetBehavior <T>() where T : Behavior
 {
     if (mComponents.ContainsKey(ActorComponent.ComponentType.Behavior))
     {
         BehaviorComponent bc = mComponents[ActorComponent.ComponentType.Behavior] as BehaviorComponent;
         return(bc.GetBehavior <T>());
     }
     return(null);
 }