public void DeleteArgument(EventArgument argument) { executeQuery("DELETE FROM Argument WHERE argnum = " + argument.argnum + " AND rownum = " + argument.rownum + " AND type = '" + argument.type + "';"); }
public void AddArgument(EventArgument argument) { // TODO check bug executeQuery("INSERT INTO Argument VALUES (" + argument.argnum + "," + argument.rownum + ",'" + argument.argument + "', '" + argument.type + "')"); }
private static void SendExplicitData(string type, object[] calArgs, RequestData info) { string err = info?.Error ?? "none"; EventArgument[] args = info?.Arguments ?? new EventArgument[] { }; calArgs = calArgs ?? new object[] { }; Log.WriteLineSilent($"Sending Data: Type: \"{type}\" | Error: \"{err}\""); BaseScript.TriggerEvent("dispatchsystem:event", type, err, EventArgument.ToArray(args.AsEnumerable()), calArgs); }
void Start() { EventDelegate delegate1 = TestFunction; EventDelegate delegate2 = TestFunction2; EventDelegate delegate3 = TestFunction3; EventManager.GetInstance().AddListener(CustomEvent.test, delegate1); EventManager.GetInstance().AddListener(CustomEvent.test, delegate2); EventManager.GetInstance().AddListener(CustomEvent.test, delegate3); EventManager.GetInstance().RemoveListener(CustomEvent.test, delegate2); EventArgument argument = new EventArgument(); argument.stringComponent = "YOOO"; EventManager.GetInstance().CallEvent(CustomEvent.test, argument); }
private void EventCallback(EventArgument eventArgument) { CustomEvent triggeredEvent; if (eventIndexes.TryGetValue(eventArgument.intComponent, out triggeredEvent)) { bool eventValue; if (triggeredEvents.TryGetValue(triggeredEvent, out eventValue)) { triggeredEvents[eventIndexes[eventArgument.intComponent]] = true; } else { print("Event " + triggeredEvent + " does not exist"); } } else { print("Event number " + eventArgument + " does not exist"); } }
protected void Event(EventArgument argument) { argument.Do(Path, m_Handler); }
public void TestFunction3(EventArgument argument) { Debug.Log("DONT FORGET ME! " + argument.stringComponent); }
public void OnStarted(EventArgument e) { StartedCounter++; }
public List<EventArgument> GetAllEventRowArguments(int selectedNumrow) { String sql = "SELECT * FROM Argument WHERE rownum = " + selectedNumrow + " ORDER BY rownum, argnum"; List<List<String>> result = GetAllData(new String[] { "argnum", "rownum", "argument", "type" }, sql); List<EventArgument> eventsrowarguments = new List<EventArgument>(); EventArgument eventsrowargument; foreach (List<String> row in result) { eventsrowargument = new EventArgument( Convert.ToInt32(row[0]), Convert.ToInt32(row[1]), row[2], row[3]); eventsrowarguments.Add(eventsrowargument); } return eventsrowarguments; }
public void OnNoAttribute(EventArgument e) { }
public void OnStarted(EventArgument e) { }
public void OnStarted(EventArgument e) { Debug.Log("TestBehaviour2::OnStarted: " + e.Data); }
public void OnGetHit(EventArgument e) { }
public void OnUnregisterEvent(EventArgument e) { EventBus.Unregister(this); }
public void TestFunction2(EventArgument argument) { Debug.Log("ALSO ME! " + argument.stringComponent); }
public void TestFunction(EventArgument argument) { Debug.Log(argument.stringComponent); }
public void OnGetHit(EventArgument e) { Debug.Log("TestBehaviour::OnGetHit:" + e.Data); }
public void OnDelayed(EventArgument e) { Debug.Log("TestBehaviour::OnDelayed: " + e.Data); }
public void OnEnded(EventArgument e) { }
public void OnUnregisterEvent(EventArgument e) { UnregisterEventCounter++; }