// CTOR

        public WiFiPlayerInput(WiFiPlayerDescriptor i_Descriptor)
        {
            m_PlayerName = i_Descriptor.name;

            m_Axes     = new Dictionary <int, AxisServerController>();
            m_AxesKeys = new List <int>();
            m_AxesData = new Dictionary <int, WiFiAxisData>();

            m_Buttons     = new Dictionary <int, ButtonServerController>();
            m_ButtonsKeys = new List <int>();
            m_ButtonsData = new Dictionary <int, WiFiButtonData>();

            m_ActionsMap = new Dictionary <int, int>();

            m_Controllers = new List <WiFiServerController>();
        }
Exemplo n.º 2
0
        private void CreatePlayers()
        {
            WiFiPlayersDatabase database = Resources.Load <WiFiPlayersDatabase>("Input/WiFi/WiFiPlayersDatabase");

            if (database != null)
            {
                for (int playerIndex = 0; playerIndex < database.count; ++playerIndex)
                {
                    WiFiPlayerDescriptor descriptor = database.GetPlayer(playerIndex);
                    if (descriptor != null)
                    {
                        WiFiPlayerInput playerInput = new WiFiPlayerInput(descriptor);

                        playerInput.Initialize();

                        playerInput.SetActive(false);
                        m_Players.Add(playerInput);
                    }
                }
            }
        }