private void Awake() { pv = GetComponent <PhotonView>(); aniCtrl = GetComponent <CAnimaitonControl>(); cCtrl = GetComponent <CharacterController>(); coll = GetComponent <CapsuleCollider>(); }
private void Awake() { pv = GetComponent <PhotonView>(); cState = GetComponent <CCharacterState>(); aniCtrl = GetComponent <CAnimaitonControl>(); blockButton = GameObject.Find("BlockButton").GetComponent <Button>(); blockButton.onClick.AddListener(BlockRPC); }
private void Awake() { tr = GetComponent <Transform>(); aniCtrl = GetComponent <CAnimaitonControl>(); camPivot = GameObject.Find("CamPivot").GetComponent <Transform>(); cState = GetComponent <CCharacterState>(); pv = GetComponent <PhotonView>(); rigid = GetComponent <Rigidbody>(); pv.synchronization = ViewSynchronization.UnreliableOnChange; pv.ObservedComponents[0] = this; currPos = tr.position; currRot = tr.rotation; }
private void Awake() { tr = GetComponent <Transform>(); nvAgent = GetComponent <NavMeshAgent>(); cState = GetComponent <CCharacterState>(); aniCtrl = GetComponent <CAnimaitonControl>(); pv = GetComponent <PhotonView>(); cCtrl = GetComponent <CharacterController>(); pv.synchronization = ViewSynchronization.UnreliableOnChange; pv.ObservedComponents[0] = this; cState.state = CCharacterState.State.Move; currPos = tr.position; currRot = tr.rotation; }
private void Awake() { tr = GetComponent <Transform>(); aniCtrl = GetComponent <CAnimaitonControl>(); camPivot = GameObject.Find("CamPivot").GetComponent <Transform>(); cState = GetComponent <CCharacterState>(); pv = GetComponent <PhotonView>(); cCtrl = GetComponent <CharacterController>(); jumpButton = GameObject.Find("JumpButton").GetComponent <Button>(); runButton = GameObject.Find("RunButton").GetComponent <Button>(); jumpButton.onClick.AddListener(Jump); runButton.onClick.AddListener(IsRunning); pv.synchronization = ViewSynchronization.UnreliableOnChange; pv.ObservedComponents[0] = this; currPos = tr.position; currRot = tr.rotation; }