void ProcessRenderMessage_PlayAnimation(PlayAnimationRenderMessage msg)
        {
            RenderEntity render_entity = m_render_entity_manager.GetObject(msg.EntityID);

            if (render_entity == null)
            {
                return;
            }
            AnimationComponent animation_component = render_entity.GetComponent(AnimationComponent.ID) as AnimationComponent;

            if (animation_component != null)
            {
                if (msg.m_animation_name_2 == null)
                {
                    animation_component.PlayerAnimation(msg.m_animation_name, msg.m_loop);
                }
                else
                {
                    animation_component.PlayerAnimation(msg.m_animation_name, false);
                    animation_component.QueueAnimation(msg.m_animation_name_2, msg.m_loop);
                }
                if (!msg.m_loop)
                {
                    animation_component.QueueAnimation(AnimationName.IDLE, true);
                }
            }
            AnimatorComponent animator_component = render_entity.GetComponent(AnimatorComponent.ID) as AnimatorComponent;

            if (animator_component != null)
            {
                animator_component.PlayAnimation(msg.m_animation_name);
            }
        }
        void PlayIdleAnimation(RenderEntity render_entity)
        {
            AnimationComponent animation_component = render_entity.GetComponent(AnimationComponent.ID) as AnimationComponent;

            if (animation_component != null)
            {
                animation_component.PlayerAnimation(AnimationName.IDLE, true);
            }
            AnimatorComponent animator_component = render_entity.GetComponent(AnimatorComponent.ID) as AnimatorComponent;

            if (animator_component != null)
            {
                animator_component.PlayAnimation(AnimationName.IDLE);
            }
        }
        void PlayLocomotorAnimation(RenderEntity render_entity)
        {
            AnimationComponent animation_component = render_entity.GetComponent(AnimationComponent.ID) as AnimationComponent;

            if (animation_component != null)
            {
                animation_component.PlayerAnimation(animation_component.LocomotorAnimationName, true);
            }
            AnimatorComponent animator_component = render_entity.GetComponent(AnimatorComponent.ID) as AnimatorComponent;

            if (animator_component != null)
            {
                animator_component.PlayAnimation(animator_component.LocomotorAnimationName);
            }
        }
        void StopMoveAnimation()
        {
            if (m_locomotor_component.IsAnimationBlocked)
            {
                return;
            }
            AnimationComponent animation_component = ParentObject.GetComponent(AnimationComponent.ID) as AnimationComponent;

            if (animation_component != null)
            {
                animation_component.PlayerAnimation(AnimationName.IDLE, true);
            }
            AnimatorComponent animator_component = ParentObject.GetComponent(AnimatorComponent.ID) as AnimatorComponent;

            if (animator_component != null)
            {
                animator_component.PlayAnimation(AnimationName.IDLE);
            }
        }
        void PlayMoveAnimation(Vector3 direction)
        {
            if (m_locomotor_component.IsAnimationBlocked)
            {
                return;
            }
            m_model_component.SetBaseAngle(Mathf.Atan2(-direction.z, direction.x) * 180 / Mathf.PI);
            AnimationComponent animation_component = ParentObject.GetComponent(AnimationComponent.ID) as AnimationComponent;

            if (animation_component != null)
            {
                animation_component.PlayerAnimation(animation_component.LocomotorAnimationName, true);
            }
            AnimatorComponent animator_component = ParentObject.GetComponent(AnimatorComponent.ID) as AnimatorComponent;

            if (animator_component != null)
            {
                animator_component.PlayAnimation(animator_component.LocomotorAnimationName);
            }
        }
        void ProcessRenderMessage_ChangeLocomotorSpeed(ChangeLocomotorSpeedRenderMessage msg)
        {
            RenderEntity render_entity = m_render_entity_manager.GetObject(msg.EntityID);

            if (render_entity == null)
            {
                return;
            }
            AnimationComponent animation_component = render_entity.GetComponent <AnimationComponent>();

            if (animation_component != null)
            {
                animation_component.LocomotorAnimationSpeed = (float)msg.m_animation_rate;
            }
            AnimatorComponent animator_component = render_entity.GetComponent <AnimatorComponent>();

            if (animator_component != null)
            {
                animator_component.LocomotorAnimationSpeed = (float)msg.m_animation_rate;
            }
        }