/// <summary> /// MonoBehaviour method called on GameObject by Unity on every frame. /// </summary> void Update() { if (photonView.isMine == false && PhotonNetwork.connected == true) { return; } if (playerInfo.health <= 0f) { // after recording, we leave the room GameManager.Instance.LeaveRoom(); } ProcessInputs(); if (IsFiring) { // TODO: temp if (LocalPlayerType.Equals(Constant.StoneElementType)) { CmdShoot(); } if (nextShootTime <= Time.time) { CmdShoot(); nextShootTime = Time.time + playerInfo.fireRate; } } else { CmdStopFire(); } if (UsingUltra) { UseUltra(); } // Debug DebugController.displayPlayerInfo(playerInfo); UltraUI.updateEnergyStatus(playerInfo); return; }
// Use this for initialization void Start() { instance = this; text = GetComponent <Text> (); text.text = "Element Data\n"; }