public void RemoveActor(BaseActor actor) { if (actorList != null && actorList.Contains(actor)) { actor.CurrentScene = null; actor.PropertyChanged -= actorPropertyChanged; actor.Release(); actorList.Remove(actor); } }
public void AddActor(BaseActor actor) { if (actorList == null) { actorList = new List <BaseActor>(); } if (!actorList.Contains(actor)) { actor.CurrentScene = this; actor.PropertyChanged += actorPropertyChanged; actor.Load(); actorList.Add(actor); } }
protected virtual void actorPropertyChanged(BaseActor actor, int id, object oldValue, object newValue) { }