Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 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;
 }