示例#1
0
        void SendChangeDirectionRenderMessage()
        {
#if COMBAT_CLIENT
            ChangeDirectionRenderMessage msg = RenderMessage.Create <ChangeDirectionRenderMessage>();
            msg.Construct(ParentObject.ID, m_base_angle, m_head_angle);
            GetLogicWorld().AddRenderMessage(msg);
#endif
        }
        void ProcessRenderMessage_ChangeDirection(ChangeDirectionRenderMessage msg)
        {
            //ZZWTODO 移动动作和朝向
            RenderEntity render_entity = m_render_entity_manager.GetObject(msg.EntityID);

            if (render_entity == null)
            {
                return;
            }
            PredictLogicComponent predic_component = render_entity.GetComponent(PredictLogicComponent.ID) as PredictLogicComponent;

            if (predic_component != null && predic_component.HasMovementPredict)
            {
                return;
            }
            ModelComponent model_component = render_entity.GetComponent(ModelComponent.ID) as ModelComponent;

            if (model_component == null)
            {
                return;
            }
            model_component.UpdateAngle();
        }