public Player(int playerId) { DeviceId = -1; PlayerId = playerId; airController = AirController.Instance; }
void Awake() { Instance = this; DontDestroyOnLoad(gameObject); ResetPlayers(); }
public Device(int deviceId) { airController = AirController.Instance; DeviceId = deviceId; Input = new Input(); airController.StartCoroutine(LoadProfilePicture()); }
protected virtual void Awake() { Instance = this; DontDestroyOnLoad(gameObject); Players = new Dictionary <int, Player>(); Devices = new Dictionary <int, Device>(); ResetPlayers(); }
public override void OnInspectorGUI() { controller = (AirController)target; DrawSettings(); DrawStats(); foreach (Device d in controller.Devices.Values) { DrawDevice(d); } EditorUtility.SetDirty(controller); }
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()); }
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); }