예제 #1
0
        private IEnumerator WaitForClosingSequenceEnd(CharacterComponent charTarget)
        {
            _closingSequenceStage = eClosingSequenceStage.none;
            const float HoldTime = 1f;

            yield return(new WaitForSeconds(HoldTime));            // regardless of how long the animation is, we'll wait at least the length of HoldTime

            while (IsSpecialAnimationPlaying(charTarget))          // wait for the special animation to end
            {
                yield return(null);
            }

            ClosingSequenceEnd();
        }
예제 #2
0
        // start the end sequence (callback will only be called if closing sequence plays)
        public bool PlayClosingSequence()
        {
            bool IsInHostileDungeon = false;

            if (IsInHostileDungeon)             // only play the outro in a hostile dungeon
            {
                if (!_cameraComponent)
                {
                    _cameraComponent = mDMono.transform.GetComponent <CameraBase>();
                }

                PlayerController.LocalPlayerDisableNavigation();

                if (null == player)
                {
                    player = PlayerManager.LocalPlayerGameObject();
                }

                Vector3   objectToCamera  = Vector3.zero;
                Transform playerTransform = player.transform;
                if (_cameraComponent.CalculateObjectToCameraXZDir(playerTransform, ref objectToCamera))
                {
                    StartSwivel(objectToCamera);
                }

                _closingSequenceStage = eClosingSequenceStage.autoPinch;
                _autoPinchStartTime   = Time.time;
                _autoPinchStartZoom   = _cameraComponent.GetZoomDistance();

                if (null != _onClosingSequenceBegin)
                {
                    _onClosingSequenceBegin();
                }
                return(true);
            }
            return(false);
        }