// Send the swipe event
        void SendSwipeEvent(string swipeId)
        {
            string swipeEventArg = "";

            if (swipeId.Equals(swipeUpId))
            {
                swipeEventArg = GeminiInputEvent.ARG_SWIPE_UP;
            }
            else if (swipeId.Equals(swipeDownId))
            {
                swipeEventArg = GeminiInputEvent.ARG_SWIPE_DOWN;
            }
            else if (swipeId.Equals(swipeLeftId))
            {
                swipeEventArg = GeminiInputEvent.ARG_SWIPE_LEFT;
            }
            else if (swipeId.Equals(swipeRightId))
            {
                swipeEventArg = GeminiInputEvent.ARG_SWIPE_RIGHT;
            }
            else
            {
                Debug.LogError("SendSwipeEvent() got unhandled swipeId " + swipeId);
                return;
            }

            GeminiInputEvent swipeEvent = new GeminiInputEvent(GeminiInputEvent.EVENT_SWIPE);

            swipeEvent.Arg = swipeEventArg;
            swipeEvent.Send(eventManager);
        }
Пример #2
0
        private void loadTeamData()
        {
            Debug.Log(Application.dataPath);
            string filePath = Path.Combine(Application.dataPath, teamDataFile);

            if (File.Exists(filePath))
            {
                string dataAsJson = File.ReadAllText(filePath);
                teamData = JsonUtility.FromJson <TeamData>(dataAsJson);
            }
            else
            {
                Debug.LogError("GeminiScoreboard cannot load game data!");
            }
        }