public MyAiTargetBase(IMyEntityBot bot) { this.m_user = bot; this.m_bot = bot as MyAgentBot; this.m_currentTarget = MyAiTargetEnum.NO_TARGET; MyAiTargetManager.AddAiTarget(this); }
public MyAgentLogic(IMyBot bot) : base(bot) { m_entityBot = m_bot as IMyEntityBot; AiTarget = MyAIComponent.BotFactory.CreateTargetForBot(AgentBot); Debug.Assert(AiTarget != null, "Ai target was not created in CreateTargetForBot()!"); }
public MyAiTargetBase(IMyEntityBot bot) { m_user = bot; m_bot = bot as MyAgentBot; m_currentTarget = MyAiTargetEnum.NO_TARGET; MyAiTargetManager.Static.AddAiTarget(this); }
internal unsafe void DebugDrawBots() { if (MyDebugDrawSettings.DEBUG_DRAW_BOTS) { Vector2 normalizedCoord = new Vector2(0.01f, 0.4f); for (int i = 0; i < this.m_botsQueue.Count; i++) { IMyBot bot = this.m_allBots[this.m_botsQueue[i]]; if (bot is IMyEntityBot) { IMyEntityBot bot2 = bot as IMyEntityBot; Color green = Color.Green; if ((this.m_botIndex == -1) || (i != this.m_botIndex)) { green = Color.Red; } string text = $"Bot[{i}]: {bot2.BehaviorSubtypeName}"; if (bot is MyAgentBot) { text = text + (bot as MyAgentBot).LastActions.GetLastActionsString(); } MyRenderProxy.DebugDrawText2D(MyGuiManager.GetHudPixelCoordFromNormalizedCoord(normalizedCoord), text, green, 0.5f, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, false); MyCharacter botEntity = bot2.BotEntity as MyCharacter; IMyFaction faction = null; if (botEntity != null) { long identityId = botEntity.ControllerInfo.Controller.Player.Identity.IdentityId; faction = MySession.Static.Factions.TryGetPlayerFaction(identityId); } if (bot2.BotEntity != null) { Vector3D center = bot2.BotEntity.PositionComp.WorldAABB.Center; double * numPtr1 = (double *)ref center.Y; numPtr1[0] += bot2.BotEntity.PositionComp.WorldAABB.HalfExtents.Y; MyRenderProxy.DebugDrawText3D(center, $"Bot:{i}", green, 1f, false, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP, -1, false); MyRenderProxy.DebugDrawText3D(center - new Vector3(0f, -0.5f, 0f), (faction == null) ? "NO_FACTION" : faction.Tag, green, 1f, false, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP, -1, false); } float *singlePtr1 = (float *)ref normalizedCoord.Y; singlePtr1[0] += 0.02f; } } } }
public MyCyberhoundTarget(IMyEntityBot bot) : base(bot) { }
public MySpiderTarget(IMyEntityBot bot) : base(bot) { }
public MyWolfTarget(IMyEntityBot bot) : base(bot) { }
public MyAiTargetBase(IMyEntityBot bot) { m_user = bot; m_bot = bot as MyAgentBot; m_currentTarget = MyAiTargetEnum.NO_TARGET; }
public MyAiTargetAnimal(IMyEntityBot bot) : base(bot) { }
public MyAgentLogic(IMyBot bot) : base(bot) { this.m_entityBot = base.m_bot as IMyEntityBot; this.AiTarget = MyAIComponent.BotFactory.CreateTargetForBot(this.AgentBot); }