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; }
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; }
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); }
public static void PlaySound(string n, GameObject ob, OnEventNotify cb) { LoadFabric(); if (FabricLoaded) playAudioWithPositionAndEvent(n, ob, cb); }
public static void PlaySound(string n, OnEventNotify cb) { LoadFabric(); if (FabricLoaded) playAudioAndEvent(n, cb); }
private static void playAudioWithPositionAndEvent(string eventName, GameObject ob, OnEventNotify cb) { //AUDIO: with position EventManager.Instance.PostEventNotify(eventName, ob, cb); }
private static void playAudioAndEvent(string eventName, OnEventNotify cb) { //AUDIO: without position EventManager.Instance.PostEventNotify(eventName, cb); }
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)); }
public bool PostEventNotify(string eventName, EventAction eventAction, object parameter, GameObject parentGameObject, OnEventNotify onEventNotify) { return(PostEvent(eventName, eventAction, parameter, parentGameObject, null, addToQueue: false, onEventNotify)); }
public bool PostEventNotify(string eventName, EventAction eventAction, OnEventNotify onEventNotify) { return(PostEvent(eventName, eventAction, null, null, null, addToQueue: false, onEventNotify)); }
public bool PostEventNotify(string eventName, GameObject parentGameObject, InitialiseParameters initialiseParameters, OnEventNotify onEventNotify) { return(PostEvent(eventName, EventAction.PlaySound, null, parentGameObject, initialiseParameters, addToQueue: false, onEventNotify)); }