Ejemplo n.º 1
0
 public virtual unsafe void DebugDraw()
 {
     if (this.AgentEntity != null)
     {
         MyAiTargetBase aiTargetBase = this.m_actions.AiTargetBase;
         if ((aiTargetBase != null) && aiTargetBase.HasTarget())
         {
             MyRenderProxy.DebugDrawPoint(aiTargetBase.TargetPosition, Color.Aquamarine, false, false);
             if ((this.BotEntity != null) && (aiTargetBase.TargetEntity != null))
             {
                 string text = null;
                 text = (aiTargetBase.TargetType != MyAiTargetEnum.CUBE) ? $"Target:{aiTargetBase.TargetEntity.ToString()}" : $"Target:{aiTargetBase.GetTargetBlock()}";
                 Vector3D center  = this.BotEntity.PositionComp.WorldAABB.Center;
                 double * numPtr1 = (double *)ref center.Y;
                 numPtr1[0] += this.BotEntity.PositionComp.WorldAABB.HalfExtents.Y + 0.20000000298023224;
                 MyRenderProxy.DebugDrawText3D(center, text, Color.Red, 1f, false, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP, -1, false);
             }
         }
         this.m_botLogic.DebugDraw();
     }
 }