Example #1
0
 public void OnAppearanceAction(ObjectAppearanceType type)
 {
     foreach (var listener in _collection)
     {
         listener.OnAppearanceAction(type);
     }
 }
Example #2
0
 public void OnAppearanceAction(ObjectAppearanceType type)
 {
     if (type.Equals(ObjectAppearanceType.Appeared))
     {
         CurrentState = StatesHolder.MobMoveStates.IdleState;
     }
     if (type.Equals(ObjectAppearanceType.Created))
     {
         _vision.SpottedImportantObject += OnObjectSpotted;
     }
 }
Example #3
0
 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);
 }