public ControllerInterface(int team, bool usingRemote, WiimoteReceiver reciever = null) { //this.team = team; //this.reciever = reciever; if (!usingRemote) { if (team == 1) { player1 = new Keyboard_player1 (); } else { player2 = new Keyboard_player2 (); } } else { if (reciever != null) { do { if(team == 1 && reciever.wiimotes.ContainsKey(team)) { player1 = (Wiimote)reciever.wiimotes [team]; } else if (reciever.wiimotes.ContainsKey(team)) { player2 = (Wiimote)reciever.wiimotes[team]; } } while (!reciever.wiimotes.ContainsKey(team)); } else if (team == 1) { player1 = new Keyboard_player1 (); } else { player2 = new Keyboard_player2 (); } } }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect(); mainThruster = gameObject.GetComponentInChildren <ParticleSystem> (); mainThrusterSource = gameObject.AddComponent <AudioSource> (); topThrusterSource = gameObject.AddComponent <AudioSource> (); leftThrusterSource = gameObject.AddComponent <AudioSource> (); rightThrusterSource = gameObject.AddComponent <AudioSource> (); frontThrusterSource = gameObject.AddComponent <AudioSource> (); backThrusterSource = gameObject.AddComponent <AudioSource> (); mainThrusterSource.clip = mainThrusterSound; topThrusterSource.clip = sideThrusterSound; topThrusterSource.volume = 0.7f; leftThrusterSource.clip = sideThrusterSound; leftThrusterSource.volume = 0.7f; rightThrusterSource.clip = sideThrusterSound; rightThrusterSource.volume = 0.7f; frontThrusterSource.clip = sideThrusterSound; frontThrusterSource.volume = 0.7f; backThrusterSource.clip = sideThrusterSound; backThrusterSource.volume = 0.7f; }
// Use this for initialization void Start() { // should initialize TheBrain receiver = WiimoteReceiver.Instance; receiver.connect(); //if(TheBrain.GetInstance().LoadedSaveGame()){ TheBrain.GetInstance().LoadSaveGame(selectedSaveGame); /*} else { * print("already loaded"); * }*/ this.availableLevels = TheBrain.GetInstance().GetAvailableLevels(); if (audio == null) { gameObject.AddComponent(typeof(AudioSource)); } }
void Start() { ENABLE_WIIMOTE = Wiimote.enableWiiMote (); // Initialize wiimote receiver // TODO(Douglas): Make this work for multiple controllers (if needed) ci = ControllerInterface.Instance; if (ENABLE_WIIMOTE) { receiver = WiimoteReceiver.Instance; receiver.connect (); while (true) { if (receiver.wiimotes.ContainsKey (1)) { ci.setController (1, receiver.wiimotes [1]); break; } } } }
public ControllerInterface(int team, bool usingRemote, WiimoteReceiver reciever = null) { //this.team = team; //this.reciever = reciever; if (!usingRemote) { if (team == 1) { player1 = new Keyboard_player1(); } else { player2 = new Keyboard_player2(); } } else { if (reciever != null) { do { if (team == 1 && reciever.wiimotes.ContainsKey(team)) { player1 = (Wiimote)reciever.wiimotes [team]; } else if (reciever.wiimotes.ContainsKey(team)) { player2 = (Wiimote)reciever.wiimotes[team]; } } while (!reciever.wiimotes.ContainsKey(team)); } else if (team == 1) { player1 = new Keyboard_player1(); } else { player2 = new Keyboard_player2(); } } }
void Start() { ENABLE_WIIMOTE = Wiimote.enableWiiMote(); // Initialize wiimote receiver // TODO(Douglas): Make this work for multiple controllers (if needed) ci = ControllerInterface.Instance; if (ENABLE_WIIMOTE) { receiver = WiimoteReceiver.Instance; receiver.connect(); while (true) { if (receiver.wiimotes.ContainsKey(1)) { ci.setController(1, receiver.wiimotes [1]); break; } } } }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect(); initPosition = transform.rotation; }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect (); }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect(); }
// Use this for initialization void Start() { // should initialize TheBrain receiver = WiimoteReceiver.Instance; receiver.connect (); //if(TheBrain.GetInstance().LoadedSaveGame()){ TheBrain.GetInstance ().LoadSaveGame (selectedSaveGame); /*} else { print("already loaded"); }*/ this.availableLevels = TheBrain.GetInstance ().GetAvailableLevels (); if(audio == null) { gameObject.AddComponent(typeof(AudioSource)); } }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect (); mainThruster = gameObject.GetComponentInChildren<ParticleSystem> (); mainThrusterSource = gameObject.AddComponent<AudioSource> (); topThrusterSource = gameObject.AddComponent<AudioSource> (); leftThrusterSource = gameObject.AddComponent<AudioSource> (); rightThrusterSource = gameObject.AddComponent<AudioSource> (); frontThrusterSource = gameObject.AddComponent<AudioSource> (); backThrusterSource = gameObject.AddComponent<AudioSource> (); mainThrusterSource.clip = mainThrusterSound; topThrusterSource.clip = sideThrusterSound; topThrusterSource.volume = 0.7f; leftThrusterSource.clip = sideThrusterSound; leftThrusterSource.volume = 0.7f; rightThrusterSource.clip = sideThrusterSound; rightThrusterSource.volume = 0.7f; frontThrusterSource.clip = sideThrusterSound; frontThrusterSource.volume = 0.7f; backThrusterSource.clip = sideThrusterSound; backThrusterSource.volume = 0.7f; }
// Use this for initialization void Start() { receiver = WiimoteReceiver.Instance; receiver.connect(); initPosition = transform.rotation; Debug.Log("Reciever Obj: "+receiver); Debug.Log("WiiMotes: " + receiver.wiimotes); foreach(var obj in receiver.wiimotes) { Debug.Log(obj.ToString()); } }