public void SetupAwake() { Motor = this.GetComponent <CharacterMotor>(); controller = this.GetComponent <CharacterController>(); Audiosource = this.GetComponent <AudioSource>(); animator = this.GetComponent <Animator>(); rayActive = this.GetComponent <FPSRayActive>(); inventory = this.GetComponent <CharacterInventory>(); spdMovAtkMult = 1; positionSync = this.transform.position; rotationYSync = this.transform.rotation.eulerAngles.y; positionLate = positionSync; positionLastTrip = positionSync; }
public virtual void SetupAwake() { Motor = this.GetComponent <CharacterMotor> (); controller = this.GetComponent <CharacterController> (); Audiosource = this.GetComponent <AudioSource> (); animator = this.GetComponent <Animator> (); if (!animator) { animator = this.GetComponentInChildren <Animator> (); } rayActive = this.GetComponent <FPSRayActive> (); spdMovAtkMult = 1; }
public void SetupAwake() { DontDestroyOnLoad (this.gameObject); networkViewer = this.GetComponent<NetworkView> (); Motor = this.GetComponent<CharacterMotor> (); controller = this.GetComponent<CharacterController> (); Audiosource = this.GetComponent<AudioSource> (); animator = this.GetComponent<Animator> (); rayActive = this.GetComponent<FPSRayActive> (); inventory = this.GetComponent<CharacterInventory> (); spdMovAtkMult = 1; }