void Start() { // init game objects player = GameObject.Find("Player"); cameraObject = player.transform.Find("FirstPerson/Camera").gameObject; particleObject = GameObject.Find("WarpTargetMarker"); // init components cameraController = cameraObject.GetComponent <FPCameraController>(); characterController = GetComponent <CharacterController>(); particleComponent = particleObject.GetComponent <ParticleSystem>(); motionBlurComponent = cameraObject.GetComponent <Kino.Motion>(); audioController = player.transform.Find("ThirdPerson/DefaultAvatar").GetComponent <AudioController>(); // set initial state state = State.MOVING; motionBlurComponent.enabled = false; }
// Use this for initialization void Start() { motionBlurScript = Camera.main.GetComponent <Kino.Motion>(); motionBlurText = this.gameObject.GetComponent <TextMeshProUGUI>(); }