Esempio n. 1
0
        public Player(int playerId)
        {
            DeviceId = -1;
            PlayerId = playerId;

            airController = AirController.Instance;
        }
Esempio n. 2
0
        void Awake()
        {
            Instance = this;

            DontDestroyOnLoad(gameObject);

            ResetPlayers();
        }
Esempio n. 3
0
        public Device(int deviceId)
        {
            airController = AirController.Instance;
            DeviceId      = deviceId;
            Input         = new Input();

            airController.StartCoroutine(LoadProfilePicture());
        }
Esempio n. 4
0
        protected virtual void Awake()
        {
            Instance = this;

            DontDestroyOnLoad(gameObject);

            Players = new Dictionary <int, Player>();
            Devices = new Dictionary <int, Device>();

            ResetPlayers();
        }
Esempio n. 5
0
        public override void OnInspectorGUI()
        {
            controller = (AirController)target;

            DrawSettings();
            DrawStats();

            foreach (Device d in controller.Devices.Values)
            {
                DrawDevice(d);
            }


            EditorUtility.SetDirty(controller);
        }
Esempio n. 6
0
        public Device(int deviceId)
        {
            airController = AirController.Instance;
            DeviceId      = deviceId;
            UID           = AirConsole.instance.GetUID(deviceId);

            Input    = new Input();
            SaveData = new SaveData();

            if (airController.autoLoadSavedata)
            {
                AirConsole.instance.RequestPersistentData(new List <string> {
                    UID
                });
            }

            airController.StartCoroutine(LoadProfilePicture());
        }
Esempio n. 7
0
        public override void OnInspectorGUI()
        {
            controller = (AirController)target;

            DrawSettings();

            if (!EditorApplication.isPlaying)
            {
                return;
            }

            DrawStats();

            if (controller.Players.Count > 0)
            {
                showUnclaimedPlayers = EditorGUILayout.Foldout(showUnclaimedPlayers, "Unclaimed Players");

                if (showUnclaimedPlayers)
                {
                    foreach (Player p in controller.Players.Values)
                    {
                        if (p.state != Player.STATE.CLAIMED)
                        {
                            DrawPlayer(p);
                        }
                    }
                }
            }

            showDevices = EditorGUILayout.Foldout(showDevices, "Devices");
            if (showDevices)
            {
                foreach (Device d in controller.Devices.Values)
                {
                    DrawDevice(d);
                }
            }

            EditorUtility.SetDirty(controller);
        }