Exemplo n.º 1
0
    void InputManager()
    {
        if (ReadyToMove && playing)
        {
            //#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBPLAYER
            if (Input.GetKeyDown(KeyCode.UpArrow))
            {
                MoveTiles(0);
            }
            else if (Input.GetKeyDown(KeyCode.RightArrow))
            {
                MoveTiles(1);
            }
            else if (Input.GetKeyDown(KeyCode.DownArrow))
            {
                MoveTiles(2);
            }
            else if (Input.GetKeyDown(KeyCode.LeftArrow))
            {
                MoveTiles(3);
            }
            //#elif UNITY_ANDROID || UNITY_IOS
            MoveTiles(SwipeManager.Swipe());
//#endif
        }
        //if (Input.GetKeyDown(KeyCode.Space)) //For Debugging Purposes Only
        //    SpawnTile();
    }