void TrySwitchToExplore(MySmallShipBot bot) { Vector3?result = null; if (bot.TryGetTestPositionResult(ref result)) { if (result.HasValue) { m_exploreTarget = result.Value; m_exploreTargetTimer = MyMwcUtils.GetRandomFloat(2, 3); m_state = CuriousState.EXPLORE; } else { bool success = TrySwitchExploreSearch(bot); Debug.Assert(success); } } }
void TrySwitchToFlyAround(MySmallShipBot bot) { Vector3?result = null; if (bot.TryGetTestPositionResult(ref result)) { if (result.HasValue) { m_flyToTarget = result.Value; m_flyAroundTimer = MyMwcUtils.GetRandomFloat(2, 3); m_strafe = MyMwcUtils.GetRandomBool(4); //Vector3.DistanceSquared(flyToTarget, bot.GetPosition()) < STRAFE_DISTANCE_SQR; m_state = StateEnum.FLYING_AROUND; } else { // Position failed, try again bool success = TrySwitchToAttackSearch(bot); Debug.Assert(success); } } }
void TrySwitchToExplore(MySmallShipBot bot) { Vector3? result = null; if (bot.TryGetTestPositionResult(ref result)) { if (result.HasValue) { m_exploreTarget = result.Value; m_exploreTargetTimer = MyMwcUtils.GetRandomFloat(2, 3); m_state = CuriousState.EXPLORE; } else { bool success = TrySwitchExploreSearch(bot); Debug.Assert(success); } } }
void TrySwitchToFlyAround(MySmallShipBot bot) { Vector3? result = null; if (bot.TryGetTestPositionResult(ref result)) { if (result.HasValue) { m_flyToTarget = result.Value; m_flyAroundTimer = MyMwcUtils.GetRandomFloat(2, 3); m_strafe = MyMwcUtils.GetRandomBool(4); //Vector3.DistanceSquared(flyToTarget, bot.GetPosition()) < STRAFE_DISTANCE_SQR; m_state = StateEnum.FLYING_AROUND; } else { // Position failed, try again bool success = TrySwitchToAttackSearch(bot); Debug.Assert(success); } } }