예제 #1
0
 protected override void Entity_ComponentRemoved(Entity sender, ComponentEventArgs e)
 {
     if (e.Component == this.levelCompleteEventComponent)
     {
         this.levelCompleteEventComponent = null;
     }
     else if (e.Component == this.levelCompleterComponent)
     {
         this.levelCompleterComponent = null;
     }
 }
예제 #2
0
 protected override void Entity_ComponentAdded(Entity sender, ComponentEventArgs e)
 {
     if (e.Component is LevelCompleteEventComponent l)
     {
         this.levelCompleteEventComponent = l;
     }
     else if (e.Component is LevelCompleterComponent player)
     {
         this.levelCompleterComponent = player;
     }
 }