// Start is called before the first frame update void Start() { if (this.gameObject.GetComponent <PhotonView>().IsMine) { chargeMeter = GameObject.FindGameObjectWithTag("ChargeMeter").GetComponent <AbilityChargeMeter>(); chargeMeter.InitizalizeMeter(this); } jumpAbility = GetComponent <JumpAbility>(); teleportAbility = GetComponent <TeleportAbility>(); carRigidbody = this.GetComponent <Rigidbody>(); networkCharacter = GetComponent <NetworkCharacter>(); }
void Start() { pView = GetComponent <PhotonView>(); thisBody = GetComponent <Rigidbody>(); chargeMeter = GameObject.FindGameObjectWithTag("ChargeMeter").GetComponent <AbilityChargeMeter>(); int carChoice = (int)PhotonNetwork.LocalPlayer.CustomProperties["carChoice"]; if (carChoice < 2) { isHeavy = true; } thisCar = this.GetComponent <Car>(); }