internal bool TrySwitchExploreSearch(MySmallShipBot bot) { Vector3 flyTo = bot.GetPosition() + MyMwcUtils.GetRandomVector3Normalized() * MyMwcUtils.GetRandomFloat(0, 100); if (bot.TryTestPosition(flyTo, bot.GetPosition())) { m_state = CuriousState.EXPLORE_SEARCHING; return(true); } return(false); }
bool TrySwitchToAttackSearch(MySmallShipBot bot) { Vector3 newFlyToTarget = m_target.WorldVolume.Center + m_target.WorldMatrix.Forward * (MyMwcUtils.GetRandomFloat(ATTACK_DISTANCE_MIN, ATTACK_DISTANCE_MAX) + m_target.WorldVolume.Radius) + m_target.WorldMatrix.Up * MyMwcUtils.GetRandomFloat(-50, 50) + m_target.WorldMatrix.Left * MyMwcUtils.GetRandomFloat(-50, 50); if (bot.TryTestPosition(newFlyToTarget, bot.GetPosition())) { m_state = StateEnum.ATACKING_SEARCHING; return(true); } return(false); }
internal bool TrySwitchExploreSearch(MySmallShipBot bot) { Vector3 flyTo = bot.GetPosition() + MyMwcUtils.GetRandomVector3Normalized() * MyMwcUtils.GetRandomFloat(0, 100); if (bot.TryTestPosition(flyTo, bot.GetPosition())) { m_state = CuriousState.EXPLORE_SEARCHING; return true; } return false; }
bool TrySwitchToAttackSearch(MySmallShipBot bot) { Vector3 newFlyToTarget = m_target.WorldVolume.Center + m_target.WorldMatrix.Forward * (MyMwcUtils.GetRandomFloat(ATTACK_DISTANCE_MIN, ATTACK_DISTANCE_MAX) + m_target.WorldVolume.Radius) + m_target.WorldMatrix.Up * MyMwcUtils.GetRandomFloat(-50, 50) + m_target.WorldMatrix.Left * MyMwcUtils.GetRandomFloat(-50, 50); if (bot.TryTestPosition(newFlyToTarget, bot.GetPosition())) { m_state = StateEnum.ATACKING_SEARCHING; return true; } return false; }