void Update() { if(!started){ time2 -= Time.deltaTime; if(time2 <= 0) { time2 += time/numPlayers; bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent<BattleInformer>(); bi.initPlayers(initPosition[cont],cont); ++cont; if(cont == numPlayers) { started = true; bi.initFight(); } } } else { if(!finished) { numPlayers = bi.getPlayersInGame(); if(numPlayers <= 1) { finished = true; Time.timeScale = 0.5f; } } else { timefinish -= 2*Time.deltaTime; if(timefinish <= 0) { Destroy (GameObject.FindGameObjectWithTag("BattleInformer")); Application.LoadLevel(Application.loadedLevel - 1); } } } }
void Start() { control = GameObject.FindGameObjectWithTag("Control").GetComponent <Control>(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); maxPlayers = bi.getMaxPlayers(); players = new bool[maxPlayers]; }
// Use this for initialization void Start() { Control control = GameObject.FindGameObjectWithTag("Control").GetComponent<Control>(); count = WiiMoteControl.wiimote_count(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent<BattleInformer>(); }
private bool[] players; //iremos marcando que numero de mando esta en funcionamiento #endregion Fields #region Methods void Start() { control = GameObject.FindGameObjectWithTag("Control").GetComponent<Control>(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent<BattleInformer>(); maxPlayers = bi.getMaxPlayers(); players = new bool[maxPlayers]; }
// Use this for initialization void Start() { Control control = GameObject.FindGameObjectWithTag("Control").GetComponent <Control>(); count = WiiMoteControl.wiimote_count(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); }
void Update() { if (!started) { time2 -= Time.deltaTime; if (time2 <= 0) { time2 += time / numPlayers; bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); bi.initPlayers(initPosition[cont], cont); ++cont; if (cont == numPlayers) { started = true; bi.initFight(); } } } else { if (!finished) { numPlayers = bi.getPlayersInGame(); if (numPlayers <= 1) { finished = true; Time.timeScale = 0.5f; } } else { timefinish -= 2 * Time.deltaTime; if (timefinish <= 0) { Destroy(GameObject.FindGameObjectWithTag("BattleInformer")); Application.LoadLevel(Application.loadedLevel - 1); } } } }
// Use this for initialization void Start() { Physics.gravity = new Vector3(0, -9.81f, 0); Time.timeScale = 1.0f; Control control = GameObject.FindGameObjectWithTag("Control").GetComponent <Control>(); BattleInformer bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); int c = WiiMoteControl.wiimote_count(); if (c > 0) { for (int i = 0; i <= c - 1; i++) { //control.RegisterPlayer(Control.ControllerType.WiiMote, i); bi.changePlayer(standardAvatar, i, 0); } } else { Debug.Log("No hay mandos, tolai!"); } }
// Use this for initialization void Start() { selection.Play(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); numPlayers = bi.getNumPlayers(); }
// Use this for initialization void Start() { selection.Play(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent<BattleInformer>(); numPlayers = bi.getNumPlayers(); }
// Use this for initialization void Start() { control = GameObject.FindGameObjectWithTag("Control").GetComponent<Control>(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent<BattleInformer>(); }
// Use this for initialization void Start() { control = GameObject.FindGameObjectWithTag("Control").GetComponent <Control>(); bi = GameObject.FindGameObjectWithTag("BattleInformer").GetComponent <BattleInformer>(); }