Exemplo n.º 1
0
 public void Reset()
 {
     _eventName            = "";
     EventAction           = EventAction.PlaySound;
     eventStatus           = EventStatus.Not_Handled;
     parentGameObject      = null;
     _parameter            = null;
     _delay                = 0f;
     _delayTimer           = 0f;
     _initialiseParameters = null;
     _onEventNotify        = null;
     _eventCategory        = null;
     _priority             = 0;
 }
Exemplo n.º 2
0
 public void Copy(Fabric.Event fromEvent)
 {
     _eventName            = fromEvent._eventName;
     EventAction           = fromEvent.EventAction;
     eventStatus           = fromEvent.eventStatus;
     parentGameObject      = fromEvent.parentGameObject;
     _parameter            = fromEvent._parameter;
     _delay                = fromEvent._delay;
     _delayTimer           = fromEvent._delayTimer;
     _initialiseParameters = fromEvent._initialiseParameters;
     _onEventNotify        = fromEvent._onEventNotify;
     _eventCategory        = fromEvent._eventCategory;
     _priority             = fromEvent._priority;
 }
Exemplo n.º 3
0
 public bool PostEvent(int eventID, EventAction eventAction = EventAction.PlaySound, GameObject parentGameObject = null, object parameter = null, OnEventNotify onEventNotify = null, InitialiseParameters initialiseParameters = null, bool addToQueue = false)
 {
     if (_enable && EventManager.Instance != null)
     {
         return(EventManager.Instance.PostEvent(eventID, eventAction, parameter, parentGameObject, initialiseParameters, addToQueue, onEventNotify));
     }
     return(false);
 }
Exemplo n.º 4
0
 public static void PlaySound(string n, GameObject ob, OnEventNotify cb)
 {
     LoadFabric();
     if (FabricLoaded)
         playAudioWithPositionAndEvent(n, ob, cb);
 }
Exemplo n.º 5
0
 public static void PlaySound(string n, OnEventNotify cb)
 {
     LoadFabric();
     if (FabricLoaded)
         playAudioAndEvent(n, cb);
 }
Exemplo n.º 6
0
 private static void playAudioWithPositionAndEvent(string eventName, GameObject ob, OnEventNotify cb)
 {
     //AUDIO: with position
     EventManager.Instance.PostEventNotify(eventName, ob, cb);
 }
Exemplo n.º 7
0
 private static void playAudioAndEvent(string eventName, OnEventNotify cb)
 {
     //AUDIO: without position
     EventManager.Instance.PostEventNotify(eventName, cb);
 }
Exemplo n.º 8
0
 public bool PostEvent(int eventID, EventAction eventAction, object parameter, GameObject parentGameObject, InitialiseParameters initialiseParameters, bool addToQueue, OnEventNotify onEventNotify)
 {
     if (parentGameObject != null)
     {
         newEvent.parentGameObject = parentGameObject;
     }
     else
     {
         newEvent.parentGameObject = null;
     }
     newEvent._eventID              = eventID;
     newEvent.EventAction           = eventAction;
     newEvent._parameter            = parameter;
     newEvent._initialiseParameters = initialiseParameters;
     newEvent._onEventNotify        = onEventNotify;
     return(PostEventID(newEvent, addToQueue));
 }
Exemplo n.º 9
0
 public bool PostEventNotify(string eventName, EventAction eventAction, object parameter, GameObject parentGameObject, OnEventNotify onEventNotify)
 {
     return(PostEvent(eventName, eventAction, parameter, parentGameObject, null, addToQueue: false, onEventNotify));
 }
Exemplo n.º 10
0
 public bool PostEventNotify(string eventName, EventAction eventAction, OnEventNotify onEventNotify)
 {
     return(PostEvent(eventName, eventAction, null, null, null, addToQueue: false, onEventNotify));
 }
Exemplo n.º 11
0
 public bool PostEventNotify(string eventName, GameObject parentGameObject, InitialiseParameters initialiseParameters, OnEventNotify onEventNotify)
 {
     return(PostEvent(eventName, EventAction.PlaySound, null, parentGameObject, initialiseParameters, addToQueue: false, onEventNotify));
 }