void Awake () { // Set up the references. behaviours = new List<GenericBehaviour> (); overridingBehaviours = new List<GenericBehaviour>(); anim = GetComponent<Animator> (); hFloat = Animator.StringToHash("H"); vFloat = Animator.StringToHash("V"); camScript = playerCamera.GetComponent<ThirdPersonOrbitCamBasic> (); rBody = GetComponent<Rigidbody> (); // Grounded verification variables. groundedBool = Animator.StringToHash("Grounded"); colExtents = GetComponent<Collider>().bounds.extents; }
void Awake() { // Set up the references. behaviours = new List <GenericBehaviour> (); overridingBehaviours = new List <GenericBehaviour>(); anim = GetComponent <Animator> (); hFloat = Animator.StringToHash("H"); vFloat = Animator.StringToHash("V"); camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic> (); rBody = GetComponent <Rigidbody> (); // Grounded verification variables. groundedBool = Animator.StringToHash("Grounded"); colExtents = GetComponent <Collider>().bounds.extents; Cursor.SetCursor(crosshair, hotSpot, CursorMode.ForceSoftware); Cursor.lockState = CursorLockMode.Locked; }
void Awake() { playerCamera = Camera.main.transform; // Set up the references. behaviours = new List <GenericBehaviour>(); overridingBehaviours = new List <GenericBehaviour>(); hFloat = Animator.StringToHash("H"); vFloat = Animator.StringToHash("V"); camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic>(); camScript.Setup(this.transform); rBody = GetComponent <Rigidbody>(); unityAnim = GetComponent <Animator>(); }
void Start() { // Set up the references. behaviours = new List <GenericBehaviour> (); overridingBehaviours = new List <GenericBehaviour>(); anim = GetComponent <Animator> (); hFloat = Animator.StringToHash("H"); vFloat = Animator.StringToHash("V"); camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic> (); rBody = GetComponent <Rigidbody> (); // Grounded verification variables. groundedBool = Animator.StringToHash("Grounded"); colExtents = GetComponent <Collider>().bounds.extents; //LeftJoy PlayerInputManager.getins().LeftJoy += Joy; //PlayerInputManager.getins().OnLeftJoyUp += LeftJoyUp; }
public override void Init(bool isOwner) { _isOwner = isOwner; unityAnim = GetComponent <Animator>(); hFloat = Animator.StringToHash("H"); vFloat = Animator.StringToHash("V"); groundedBool = Animator.StringToHash("Grounded"); jumpBool = Animator.StringToHash("Jump"); speedFloat = Animator.StringToHash("Speed"); colExtents = GetComponent <Collider>().bounds.extents; if (_isOwner) { playerCamera = Camera.main.transform; rBody = GetComponent <Rigidbody>(); camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic>(); camScript.Setup(this.transform); } _initialized = true; }
void Start() { refScript = GetComponentInChildren <ThirdPersonOrbitCamBasic>(); camOffset = refScript.camOffset; pivotOffset = refScript.pivotOffset; }