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; } }
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; } }