Exemplo n.º 1
0
        public static void CreateFixedStrategy(CMap Terrain)
        {
            FixedStrategyDataSource ds = new FixedStrategyDataSource(Terrain);

            ActiveStrategy = new TargetingStrategy(ds);
            FreeStrategyPool.Clear();
        }
Exemplo n.º 2
0
        public static TargetingStrategy GetFromPool()
        {
            TargetingStrategy FreeStrategy = null;
            bool b = FreeStrategyPool.TryPop(out FreeStrategy);

            if (!b)
            {
                FreeStrategy = ActiveStrategy.Clone();
            }

            return(FreeStrategy);
        }
Exemplo n.º 3
0
 public static void Release(TargetingStrategy strategy)
 {
     FreeStrategyPool.Push(strategy);
 }