Пример #1
0
 public HitHandler(IFishStage _Stage, HitRequest request)
 {
     this._Stage = _Stage;
     _Request = request;
     _Enable = true;
     _TimeCounter = new TimeCounter();
 }
        public NormalStatus(ISoulBinder binder, Entity player)
        {
            _TimeCounter = new TimeCounter();
            _Binder = binder;
            _Player = player;

            _MoveController = new MoveController(_Player);
        }
Пример #3
0
        public SkillCaster(SkillData data, Determination determination)
        {
            Data           = data;
            _Determination = determination;
            _Timer         = new TimeCounter();

            _NextBegin = (Data.Begin + Data.End) / 2;
        }
Пример #4
0
        public NormalStatus(ISoulBinder binder, Entity player)
        {
            _TimeCounter = new TimeCounter();
            _Binder      = binder;
            _Player      = player;

            _MoveController = new MoveController(_Player);
        }
Пример #5
0
        public StunStatus(IBinder binder, Entity player)
        {
            _Binder = binder;
            _Player = player;

            _Counter = new TimeCounter();
            _Stun    = 10f;
        }
 public ExploreStatus(ISoulBinder binder, Entity player , IMapFinder map , Guid target_id)
 {
     _Binder = binder;
     _Player = player;
     _Map = map;
     _TargetId = target_id;
     _CastTimer = new TimeCounter();
 }
 public ControlStatus(ISoulBinder binder, Entity player, Mover mover , IMapFinder map)
 {
     _Binder = binder;
     _Player = player;
     _Map = map;
     _Status = new StageMachine();
     _TimeCounter = new TimeCounter();
 }
 public ControlStatus(ISoulBinder binder, Entity player, IMapFinder map)
 {
     _Binder      = binder;
     _Player      = player;
     _Map         = map;
     _Status      = new StageMachine();
     _TimeCounter = new TimeCounter();
 }
Пример #9
0
 public AidStatus(IBinder binder, Entity player, IMapFinder map, Guid item_id)
 {
     _Targets     = new Dictionary <Guid, IIndividual>();
     _TimeCounter = new TimeCounter();
     _Binder      = binder;
     _Player      = player;
     _Map         = map;
     _ItemId      = item_id;
 }
Пример #10
0
 public AidStatus(ISoulBinder binder, Entity player,IMapFinder map, Guid item_id)
 {
     _Targets = new Dictionary<Guid, IIndividual>();
     _TimeCounter = new TimeCounter();
     _Binder = binder;
     _Player = player;
     _Map = map;
     _ItemId = item_id;
 }
Пример #11
0
 public PowerRegulator()
 {
     _Sample    = 1.0f;
     _SpinWait  = new SpinWait();
     _SpinCount = 0;
     _WorkCount = 0;
     _Busy      = 0;
     _TimeCount = new TimeCounter();
     _FPS       = new FPSCounter();
 }
Пример #12
0
 public BattleCasterStatus(ISoulBinder binder, Entity player, IMapFinder map, SkillCaster caster)
 {
     _CastTimer      = new TimeCounter();
     _Attacked       = new HashSet <Guid>();
     _Binder         = binder;
     _Player         = player;
     _Map            = map;
     _Caster         = caster;
     _MoveController = new MoveController(player);
 }
 public BattleCasterStatus(ISoulBinder binder, Entity player, IMapFinder map, SkillCaster caster)
 {
     _CastTimer = new TimeCounter();
     _Attacked = new HashSet<Guid>();
     _Binder = binder;
     _Player = player;
     _Map = map;
     _Caster = caster;
     _MoveController = new MoveController(player);
 }
Пример #14
0
        public GameStage(ISoulBinder binder, IMapFinder map , IMapGate gate, Entity entity)
        {
            _Gate = gate;
            _Map = map;
            _Binder = binder;
            _DeltaTimeCounter = new TimeCounter();
            _UpdateTimeCounter = new TimeCounter();
            _Updater = new Updater();
            _Machine = new StageMachine();
            _DifferenceNoticer = new DifferenceNoticer<IIndividual>();

            _Player = entity;
            _Mover = new Mover(this._Player);
        }
 public TalkReceiver()
 {
     _Counter = new Regulus.Utility.TimeCounter();
 }
 public TalkReceiver()
 {
     _Counter = new Regulus.Utility.TimeCounter();
 }
Пример #17
0
 // Use this for initialization
 void Start()
 {
     _Client = Client.Instance;
     _Client.InitialDoneEvent += _Client_InitialDoneEvent;
     _TimeCounter              = new Regulus.Utility.TimeCounter();
 }
Пример #18
0
 public FPSCounter()
 {
     _Counter = new TimeCounter();
 }
Пример #19
0
 protected Behavior()
 {
     _Transponder      = new GpiTransponder();
     _DeltaTimeCounter = new TimeCounter();
 }
Пример #20
0
    IEnumerator _QueryResult(System.Action <Suit[]> suit_callback)
    {
        var propertyValues = _Conditions;// (from c in _Conditions select new BladeAndSoulGossipCards.PropertyValue { Id = c.Id, Value = c.Value }).ToArray();

        //BladeAndSoulGossipCards.CardSet set = BladeAndSoulGossipCards.CardSet.Instance;
        var cards = BladeAndSoulGossipCards.CardSet.Instance.Filter(_Cards, propertyValues);

        Card[] cards1 = cards.Assort(1).Fill(CardSet.Instance, 1);
        Card[] cards2 = cards.Assort(2).Fill(CardSet.Instance, 2);
        Card[] cards3 = cards.Assort(3).Fill(CardSet.Instance, 3);
        Card[] cards4 = cards.Assort(4).Fill(CardSet.Instance, 4);
        Card[] cards5 = cards.Assort(5).Fill(CardSet.Instance, 5);
        Card[] cards6 = cards.Assort(6).Fill(CardSet.Instance, 6);
        Card[] cards7 = cards.Assort(7).Fill(CardSet.Instance, 7);
        Card[] cards8 = cards.Assort(8).Fill(CardSet.Instance, 8);
        Regulus.Utility.TimeCounter timeCounter = new Regulus.Utility.TimeCounter();
        List <Suit> suits = new List <Suit>();

        CalculationAmount = cards1.Count() * cards2.Count() * cards3.Count() * cards4.Count() * cards5.Count() * cards6.Count() * cards7.Count() * cards8.Count();
        CalculationCount  = 0;
        Property[] propertys = propertyValues.ToArray();
        foreach (var card1 in cards1)
        {
            foreach (var card2 in cards2)
            {
                foreach (var card3 in cards3)
                {
                    foreach (var card4 in cards4)
                    {
                        foreach (var card5 in cards5)
                        {
                            foreach (var card6 in cards6)
                            {
                                foreach (var card7 in cards7)
                                {
                                    foreach (var card8 in cards8)
                                    {
                                        if (timeCounter.Second > 1.0f / 30.0f)
                                        {
                                            timeCounter.Reset();

                                            var orders = suits.OrderBy((suit) => suit.GetValue(propertys[0]));
                                            foreach (var property in propertys.Skip(1))
                                            {
                                                orders = orders.ThenBy((suit) => suit.GetValue(property));
                                            }

                                            suits = orders.ToList();

                                            if (suits.Count > 30)
                                            {
                                                suits.RemoveRange(0, suits.Count - 30);
                                            }

                                            yield return(new WaitForEndOfFrame());
                                        }

                                        var s = new Suit(card1, card2, card3, card4, card5, card6, card7, card8);

                                        bool pass = (from filter in propertyValues
                                                     where s.GetValue(filter) < filter.Value
                                                     select false).Count() == 0;

                                        if (pass)
                                        {
                                            suits.Add(s);
                                        }
                                        CalculationCount++;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        var result = suits.OrderByDescending((suit) => suit.GetValue(propertys[0]));

        foreach (var property in propertys.Skip(1))
        {
            result = result.ThenByDescending((suit) => suit.GetValue(property));
        }


        suit_callback(result.ToArray());

        yield return(new WaitForEndOfFrame());
    }
Пример #21
0
 public BotPlayStage(IFishStage fish_stage)
 {
     _HitHandlers = new Updater();
     _HitTime = new TimeCounter();
     _Stage = fish_stage;
 }
Пример #22
0
 public DieHandler()
 {
     _Counter = new Regulus.Utility.TimeCounter();
 }
Пример #23
0
 protected Wisdom()
 {
     _Transponder = new GpiTransponder();
     _DeltaTimeCounter = new TimeCounter();
 }
Пример #24
0
 public TimerStage(float second)
 {
     _Counter = new TimeCounter();
     _Second = second;
 }
Пример #25
0
 public FPSCounter()
 {
     _Counter = new TimeCounter();
 }
Пример #26
0
 public TimerStage(float second)
 {
     _Counter = new TimeCounter();
     _Second  = second;
 }
Пример #27
0
 public Entity()
 {
     _DeltaTime = new TimeCounter();
 }
Пример #28
0
 public WaitSeconds(float seconds)
 {
     _TimeCounter = new TimeCounter();
     _Seconds     = seconds;
 }
Пример #29
0
 public PacketRegulator()
 {
     _Counter = new TimeCounter();
 }
Пример #30
0
        private static void _UpdateProxy(object obj)
        {
            var weak = (WeakReference<Proxy>)obj;

            var spin = new SpinWait();

            var counter = new TimeCounter();
            while(true)
            {
                Proxy proxy;

                if(weak.TryGetTarget(out proxy) == false)
                {
                    break;
                }

                if(proxy.Enable == false)
                {
                    break;
                }

                IUpdatable updater = proxy;
                updater.Update();
                updater = null;
                proxy = null;
                if(counter.Second >= 1.0f)
                {
                    GC.Collect();
                    counter.Reset();
                }
            }
        }
Пример #31
0
 public Elastic()
 {
     _CollisionCooldown = new Regulus.Utility.TimeCounter();
 }
Пример #32
0
 public Move()
 {
     _CollisionCooldown = new Regulus.Utility.TimeCounter();
 }
Пример #33
0
 public Entity()
 {
     _DeltaTime = new TimeCounter();
 }
Пример #34
0
 protected Wisdom()
 {
     _Transponder      = new GpiTransponder();
     _DeltaTimeCounter = new TimeCounter();
 }
Пример #35
0
 public AdjustmentGameLevel(DataVisitor visitor)
 {
     _Visitor = visitor;
     _TimeCounter = new TimeCounter();
 }