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

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

            DontDestroyOnLoad(gameObject);

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

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

            DontDestroyOnLoad(gameObject);

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

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

            DrawSettings();
            DrawStats();

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


            EditorUtility.SetDirty(controller);
        }
Exemplo 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());
        }
Exemplo 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);
        }