Ejemplo n.º 1
0
 void OnTestWithData(EventPayload data)
 {
     if (TestCase.DEBUG_MESSAGE_IN_LISTENERS)
     {
         Debug.Log("Event : " + EventManager.CurrentEvent + " | Data : " + data.Get <string>("Text"));
     }
 }
Ejemplo n.º 2
0
        // -- //

        void Update()
        {
            // Add
            if (Input.GetKeyDown(KeyCode.A))
            {
                payload.Clear();

                for (int i = 0; i < _loop; ++i)
                {
                    payload.Add(i.ToString(), i.ToString());
                }
            }

            // Set
            if (Input.GetKeyDown(KeyCode.S))
            {
                for (int i = 0; i < _loop; ++i)
                {
                    if (_setWrongType)
                    {
                        payload.Set(i.ToString(), i);
                    }
                    else
                    {
                        payload.Set(i.ToString(), i.ToString());
                    }
                }
            }

            // Get
            if (Input.GetKeyDown(KeyCode.G))
            {
                for (int i = 0; i < _loop; ++i)
                {
                    payload.Get <string>(i.ToString());
                }
            }

            // Get parameters name
            if (Input.GetKeyDown(KeyCode.H))
            {
                string[] parametersName = new string[1000];

                if (_getWrongType)
                {
                    payload.GetParametersOfType <float>(ref parametersName);
                }
                else
                {
                    payload.GetParametersOfType <string>(ref parametersName);
                }
            }
        }
Ejemplo n.º 3
0
 void OnTestWithDataForEmitter(EventPayload data)
 {
     if (TestCase.DEBUG_MESSAGE_IN_LISTENERS)
     {
         Debug.Log("Event : " + EventManager.CurrentEvent + " | Emitter triggered the event. Data : " + data.Get <string>("Text"));
     }
 }