// Start is called before the first frame update void Start() { // get components rb = GetComponent <Rigidbody>(); triggerDrinkBlood = GetComponent <TriggerDrinkBlood>(); cam = GetComponentInChildren <Camera>(); // set variables terrainDetector = new TerrainDetector(); _yRotateOffset = transform.rotation.eulerAngles.y; _yRotateOffsetPosition = _yRotateOffset; _yRotateOffsetRotation = _yRotateOffset; switch (_controlScheme) { case ControlScheme.FacePosition: _setRotation = SetRotationByFacePosition; break; case ControlScheme.FaceRotation: _setRotation = SetRotationByFaceRotation; break; case ControlScheme.Hybrid: _setRotation = SetRotationHybrid; break; } }
// Start is called before the first frame update void Start() { triggerDrinkBlood = gameObject.GetComponentInParent <TriggerDrinkBlood>(); }