Example #1
0
 protected override void Entity_ComponentRemoved(Entity sender, ComponentEventArgs e)
 {
     if (e.Component == this.entityInput)
     {
         this.entityInput = null;
     }
     base.Entity_ComponentRemoved(sender, e);
 }
Example #2
0
 protected override void Entity_ComponentAdded(Entity sender, ComponentEventArgs e)
 {
     if (e.Component is PlayerInputComponent p)
     {
         this.entityInput = p;
     }
     base.Entity_ComponentAdded(sender, e);
 }