void Start() { // init variables GameObject spinCtrl = GameObject.FindGameObjectWithTag("SpinController"); camRotCtrl = spinCtrl.GetComponent <CameraRotationController>(); if (freeRoamMode) { isMovingRight = false; isMovingLeft = false; isJumping = false; } else { isMovingRight = true; isMovingLeft = false; isJumping = false; } boostMod = false; boostAnimTimer = 0.0f; // restrict the character from moving in the z-direction GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePositionZ; }
void Start() { plyr = GameObject.FindGameObjectWithTag("Player"); plyrCtrl = plyr.GetComponent <PlayerController>(); camRotCtrl = GameObject.FindGameObjectWithTag("SpinController").GetComponent <CameraRotationController>(); ps = this.gameObject.GetComponent <ParticleSystem>(); modCube = this.transform.parent.FindChild("ModifierCube"); collided = false; collisionAnimTimer = 0.0f; endRotationAnim = false; }
void Start() { plyr = GameObject.FindGameObjectWithTag("Player"); plyrCtrl = plyr.GetComponent<PlayerController>(); camRotCtrl = GameObject.FindGameObjectWithTag("SpinController").GetComponent<CameraRotationController>(); ps = this.gameObject.GetComponent<ParticleSystem>(); modCube = this.transform.parent.FindChild("ModifierCube"); collided = false; collisionAnimTimer = 0.0f; endRotationAnim = false; }
void Start() { clickController = new ClickController(this, _camera); cameraRotationController = new CameraRotationController(_camera.transform, cameraRotationRadius, cameraRotationSpeed); }
void Start() { // init variables GameObject spinCtrl = GameObject.FindGameObjectWithTag("SpinController"); camRotCtrl = spinCtrl.GetComponent<CameraRotationController>(); if( freeRoamMode ) { isMovingRight = false; isMovingLeft = false; isJumping = false; } else { isMovingRight = true; isMovingLeft = false; isJumping = false; } boostMod = false; boostAnimTimer = 0.0f; // restrict the character from moving in the z-direction GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezePositionZ; }