public void OnAppearanceAction(ObjectAppearanceType type) { foreach (var listener in _collection) { listener.OnAppearanceAction(type); } }
public void OnAppearanceAction(ObjectAppearanceType type) { if (type.Equals(ObjectAppearanceType.Appeared)) { CurrentState = StatesHolder.MobMoveStates.IdleState; } if (type.Equals(ObjectAppearanceType.Created)) { _vision.SpottedImportantObject += OnObjectSpotted; } }
private void InvokeAction(ObjectAppearanceType type) { if (_appearenceListener == null) { var listenersList = new List <IObjectAppearanceListener>(); //Adding a class that will invoke public Appearance actions in ObjectAPI listenersList.Add(new ObjectAppearanceListenerInvoker(this)); listenersList.AddRange(_appearenceListeners.GetCachedComponets <IObjectAppearanceListener>()); _appearenceListener = new ObjectAppearanceListenerCollection(listenersList); } if (_appearenceListener != null) { _appearenceListener.OnAppearanceAction(type); } }
public void OnAppearanceAction(ObjectAppearanceType type) { ObjectsAPI.Hooks.OnAppearanceAction.SafeInvoke(type, _baseObject); }