Example #1
0
        /************************************************************************************************************************/

        private void Play(DirectionalAnimationSet animations)
        {
            // Store the current time.
            _MovementSynchronization.StoreTime(_CurrentAnimationSet);

            _CurrentAnimationSet = animations;
            _Animancer.Play(animations.GetClip(_Facing));

            // If the new animation is in the synchronization group, give it the same time the previous animation had.
            _MovementSynchronization.SyncTime(_CurrentAnimationSet);
        }
        /************************************************************************************************************************/

        private void Play(DirectionalAnimationSet animations)
        {
            // 装载每一个单独的动画时, 我们有不同的动画对应每个面朝的方向.
            // 所以我们选择适合那个方向的,然后播放它.

            var clip = animations.GetClip(_Facing);

            _Animancer.Play(clip);

            // 或者我们可以在一行中这样做: _Animancer.Play(animations.GetClip(_Facing));
        }
        /************************************************************************************************************************/

        private void Play(DirectionalAnimationSet animations)
        {
            // Instead of only a single animation, we have a different one for each direction we can face.
            // So we get whichever is appropriate for that direction and play it.

            var clip = animations.GetClip(_Facing);

            _Animancer.Play(clip);

            // Or we could do that in one line:
            // _Animancer.Play(animations.GetClip(_Facing));
        }
Example #4
0
        /************************************************************************************************************************/

        private void Play(DirectionalAnimationSet animations)
        {
            _CurrentAnimationSet = animations;
            _Animancer.Play(animations.GetClip(_Facing));
        }