public CameraEventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, string cameraLayout, string cameraID) : base(id, sender, eventType, eventCategoryType) { this.cameraLayout = cameraLayout; //e.g. fullscreen? this.cameraID = cameraID; //e.g. first person collidable }
public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType) { this.id = id; //id of sender this.sender = sender; //object reference of sender this.eventType = eventType; //is it play, mute, volume, zone? this.eventCategoryType = eventCategoryType; //where did it originate? ui, menu, video }
public UserEvent(DateTime timestamp, EventCategoryType category, string title, string body) { this.Timestamp = timestamp; this.Category = category; this.Title = title; this.Body = body; }
public DeviceEvent(DateTime timestamp, EventCategoryType category, string title, string body, bool receivedFromDevice = false) { this.Timestamp = timestamp; this.Category = category; this.Title = title; this.Body = body; this.ReceivedFromDevice = receivedFromDevice; }
public EventData(string id, object sender, EventType eventType, EventCategoryType eventCategoryType) { this.id = id; this.sender = sender; this.eventType = eventType; this.eventCategoryType = eventCategoryType; }
//never used - notice it is private private SoundEventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, string cueName, AudioStopOptions audioStopOptions, AudioEmitter audioEmitter) : base(id, sender, eventType, eventCategoryType) { this.cueName = cueName; //"boing this.audioStopOptions = audioStopOptions; this.audioEmitter = audioEmitter; }
public UiOptionsEvent(EventCategoryType eventCategoryType, IActor parent, Texture2D textureEasy, Texture2D textureHard) : base(eventCategoryType, parent) { uiButtonObject = parent as UIButtonObject; this.textureEasy = textureEasy; this.textureHard = textureHard; EventManager.RegisterListener <OptionsEventInfo>(HandleEvent); }
public static void Subscribe(EventCategoryType eventCategoryType, EventHandlerDelegate del) { if (!dictionary.ContainsKey(eventCategoryType)) { dictionary.Add(eventCategoryType, new List <EventHandlerDelegate>()); } dictionary[eventCategoryType].Add(del); }
//supports passing of multiple parameter objects within an event public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, object[] additionalParameters) { this.id = id; //id of sender this.sender = sender; //object reference of sender this.eventType = eventType; //is it play, mute, volume, zone? this.eventCategoryType = eventCategoryType; //where did it originate? ui, menu, video //used to pass extra information between sender and registered recipient(s) this.additionalParameters = additionalParameters; }
public static bool Unsubscribe(EventCategoryType eventCategoryType, EventHandlerDelegate del) { if (dictionary.ContainsKey(eventCategoryType)) { List <EventHandlerDelegate> list = dictionary[eventCategoryType]; list.Remove(del); return(true); } return(false); }
public UiCoffeeWarningEventHandler(EventCategoryType eventCategoryType, IActor parent, Texture2D textureToSwitch) : base(eventCategoryType, parent) { this.textureToSwitch = textureToSwitch; uiTextureObject = parent as UITextureObject; if (uiTextureObject != null) { initialTexture = uiTextureObject.Texture; } EventManager.RegisterListener <CoffeeEventInfo>(HandleEvent); }
public static void Subscribe(EventCategoryType eventCategoryType, EventHandlerDelegate del) { if (dictionary == null) { throw new Exception("Have you initialized the EventDispatcher before calling Subscribe?"); } if (!dictionary.ContainsKey(eventCategoryType)) { dictionary.Add(eventCategoryType, new List <EventHandlerDelegate>()); } dictionary[eventCategoryType].Add(del); }
//when we don't have any pertinent string data in ID AND sender public EventData(EventActionType eventType, EventCategoryType eventCategoryType) : this(null, null, eventType, eventCategoryType, null) { }
public TextEventData(string id, object sender, EventActionType eventActionType, EventCategoryType eventCategoryType, SpriteFont font, string text, Color textColor, Color backgroundColor) : base(id, sender, eventActionType, eventCategoryType) { this.text = text; //e.g. alarm in sector 2 this.font = font; this.textColor = textColor; this.backgroundColor = backgroundColor; }
//used when we wish to specify a camera to be set as active public VideoEventData(string id, object sender, EventActionType eventActionType, EventCategoryType eventCategoryType, string name) : base(id, sender, eventActionType, eventCategoryType) { this.name = name; //e.g. target video name to play/pause/restart }
public ARVREvent(EventCategoryType eventCategoryType, EventActionType eventActionType) { EventCategoryType = eventCategoryType; EventActionType = eventActionType; }
public PlayerSpawnEventHandler(EventCategoryType eventCategoryType, IActor parent) : base(eventCategoryType, parent) { }
//pre-object[] compatability constructor public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType) : this(id, sender, eventType, eventCategoryType, null) { }
//use when you want to play a 3D sound public SoundEventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, string cueName, AudioEmitter audioEmitter) : this(id, sender, eventType, eventCategoryType, cueName, AudioStopOptions.Immediate, audioEmitter) { }
public override int GetHashCode() { int seed = 31; return(EventCategoryType.GetHashCode() + seed * EventActionType.GetHashCode()); }
//when we don't have any pertinent string data in ID AND sender but have additional event parameters public EventData(EventActionType eventType, EventCategoryType eventCategoryType, object[] additionalParameters) : this(null, null, eventType, eventCategoryType, additionalParameters) { }
//when we don't have any pertinent string data in ID public EventData(object sender, EventActionType eventType, EventCategoryType eventCategoryType) : this(null, sender, eventType, eventCategoryType, null) { }
//use when you want to stop a 2D OR 3D sound public SoundEventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, string cueName, AudioStopOptions audioStopOptions) : this(id, sender, eventType, eventCategoryType, cueName, audioStopOptions, null) { }