Exemplo n.º 1
0
            private void FSM_Enter_Down(ClickState previousState)
            {
                                #if DebugClickstates && UNITY_EDITOR
                Debug.Log(theKey.ToString() + "Clicked Down.\r\nMouse at position: " + Input.mousePosition);
                                #endif

                EventData_UI theData = new EventData_UI(theKey, Input.mousePosition);
                GameManager.Events.Broadcast <EventType_UI> ((int)EventType_UI.Clicked, theData);
            }
Exemplo n.º 2
0
 private void OnKeyReleased(EventData_UI eventData)
 {
     for (int i = 0; i < axisDatas.Length; i++)
     {
         if (eventData.TheKey == axisDatas[i].activateKey)
         {
             axisDatas[i].OnKeyReleased();
         }
     }
 }
Exemplo n.º 3
0
        private void FSM_Enter_Stopped(MouseState previousState)
        {
            EventData_UI theData = new EventData_UI();

            GameManager.Events.Broadcast <EventType_UI> ((int)EventType_UI.MouseStopped, theData);

                        #if DebugEnter && UNITY_EDITOR
            Debug.Log("Entered: MouseState.Stopped");
                        #endif
        }
Exemplo n.º 4
0
        private void FSM_Enter_Moving(MouseState previousState)
        {
            _timer_minMovingTime = moveCheckTime;

            EventData_UI theData = new EventData_UI();

            GameManager.Events.Broadcast <EventType_UI> ((int)EventType_UI.MouseMoved, theData);

                        #if DebugEnter && UNITY_EDITOR
            Debug.Log("Entered: MouseState.Moving");
                        #endif
        }
Exemplo n.º 5
0
        private void OnKeyClicked(EventData_UI eventData)
        {
            for (int i = 0; i < axisDatas.Length; i++)
            {
                if (eventData.TheKey == axisDatas[i].activateKey)
                {
                    axisDatas[i].OnKeyClicked();
                }
            }

            if (!_keysClickedThisFrame.Contains(eventData.TheKey))
            {
                _keysClickedThisFrame.Add(eventData.TheKey);
            }
        }