Example #1
0
 public void DeleteArgument(EventArgument argument)
 {
     executeQuery("DELETE FROM Argument WHERE argnum = " +
                 argument.argnum + " AND rownum = " +
                 argument.rownum + " AND type = '" +
                 argument.type + "';");
 }
Example #2
0
 public void AddArgument(EventArgument argument)
 {
     // TODO check bug
     executeQuery("INSERT INTO Argument VALUES (" +
                 argument.argnum + "," +
                 argument.rownum + ",'" +
                 argument.argument + "', '" +
                 argument.type + "')");
 }
Example #3
0
        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);
        }
Example #4
0
    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);
    }
Example #5
0
    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");
        }
    }
Example #6
0
 protected void Event(EventArgument argument)
 {
     argument.Do(Path, m_Handler);
 }
Example #7
0
 public void TestFunction3(EventArgument argument)
 {
     Debug.Log("DONT FORGET ME! " + argument.stringComponent);
 }
 public void OnStarted(EventArgument e)
 {
     StartedCounter++;
 }
Example #9
0
        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)
 {
 }
Example #12
0
 public void OnStarted(EventArgument e)
 {
     Debug.Log("TestBehaviour2::OnStarted: " + e.Data);
 }
 public void OnGetHit(EventArgument e)
 {
 }
Example #14
0
 public void OnUnregisterEvent(EventArgument e)
 {
     EventBus.Unregister(this);
 }
Example #15
0
 public void TestFunction2(EventArgument argument)
 {
     Debug.Log("ALSO ME! " + argument.stringComponent);
 }
Example #16
0
 public void TestFunction(EventArgument argument)
 {
     Debug.Log(argument.stringComponent);
 }
Example #17
0
 public void OnGetHit(EventArgument e)
 {
     Debug.Log("TestBehaviour::OnGetHit:" + e.Data);
 }
Example #18
0
 public void OnDelayed(EventArgument e)
 {
     Debug.Log("TestBehaviour::OnDelayed: " + e.Data);
 }
 public void OnEnded(EventArgument e)
 {
 }
Example #20
0
 public void OnUnregisterEvent(EventArgument e)
 {
     UnregisterEventCounter++;
 }