protected void Create_Standard_Patrol(bool IsDuringLoad)
        {
            if (!IsDuringLoad || ListMethod.NumberUnique(AIMoveManager.Instance.RoomsForRoutes) < 2)
            {
                AIMoveManager.Instance.TopUpRoomsForRoutes();
            }
            int A = AIMoveManager.Instance.RoomsForRoutes[map.D.Next(0, AIMoveManager.Instance.RoomsForRoutes.Count)];
            int B;

            while (true)
            {
                B = AIMoveManager.Instance.RoomsForRoutes[map.D.Next(0, AIMoveManager.Instance.RoomsForRoutes.Count)];
                if (B != A)
                {
                    break;
                }
            }
            Create_Standard_Patrol(A, B);
        }
Beispiel #2
0
 public override void End()
 {
     // run the ConfirmationCheck now!
     if (signalreturn.AttemptPlayerConfirmation(out Vector2 playerLoc))
     {
         signalreturn.ConfirmEnemyLocation(playerLoc);
     }
     else
     {
         //disperse every suspicious tile you can currently see.
         Dictionary <Vector2, int> CandidatesToDisperse = Me.CurrentSuspicions;
         CandidatesToDisperse = ListMethod.FilterFarAway(CandidatesToDisperse, signalreturn.MaxConfirmDistance, Me.TilePosition);
         CandidatesToDisperse = StealthMethod.MassCheckLineOfSight(mapRef, Me.TilePosition, Me.Direction, CandidatesToDisperse);
         ///for those tiles in range, dissipate suspicion
         foreach (Vector2 LocToDisperse in CandidatesToDisperse.Keys)
         {
             signalreturn.DissipateSuspicion(LocToDisperse);
         }
     }
 }
Beispiel #3
0
 public static void Main()
 {
     var lista = ListMethod.GenerateList(5);
 }
Beispiel #4
0
 public void RemoveFromRR(List <int> UsedUp)
 {
     RoomsForRoutes = ListMethod.FilterBOutOfA(RoomsForRoutes, UsedUp, 1);
 }
Beispiel #5
0
        /// <summary>
        /// 缓存参数构造函数
        /// </summary>
        /// <param name="key">缓存key</param>
        /// <param name="findExp">sql 条件</param>
        /// <param name="sortExpression">排序字段</param>
        /// <param name="startRowIndex">当前页</param>
        /// <param name="maximumRows">每页行数</param>
        /// <param name="listfun">List方法委托</param>
        public CacheArgument(string key, string where, string sortExpression, int startRowIndex, int maximumRows, ListMethod <T> listMethod)
        {
            this.Key = key;

            this.Where          = where;
            this.SortExpression = sortExpression;
            this.StartRowIndex  = startRowIndex;
            this.MaximumRows    = maximumRows;

            this.ListMethod = listMethod;
        }
Beispiel #6
0
 public static void Main() => ListMethod.GenerateList(5);
 public ListMethodDescriptor(ListMethod method, MethodInfoEx methodInfoEx, int parameterIndex)
 {
     Method       = method;
     MethodInfoEx = methodInfoEx;
     ElementType  = MethodInfoEx.MethodInfo.GetParameters()[parameterIndex].ParameterType;
 }
 public ListMethodDescriptor(ListMethod method, MethodInfoEx methodInfoEx, Type elementType)
 {
     Method       = method;
     MethodInfoEx = methodInfoEx;
     ElementType  = elementType;
 }