Beispiel #1
0
        protected Crafter(IFood food, IHyperState hyperState)
        {
            _hyperState           = hyperState;
            _hyperState.OnChange += HyperStateOnOnChange;
            Food = food;

            _timer = new Timer(Callback, null, 10_000 / _hyperState.DivideBy, 10_000 / _hyperState.DivideBy);
        }
Beispiel #2
0
        protected Gatherer(IHyperState hyperState, params IResource[] resources)
        {
            _hyperState           = hyperState;
            _hyperState.OnChange += HyperStateOnOnChange;

            foreach (var resource in resources)
            {
                Resources.Add(resource);
            }

            _timer = new Timer(Callback, null, 10_000 / hyperState.DivideBy, 10_000 / hyperState.DivideBy);
        }
Beispiel #3
0
 public Builder(IFood food, IHyperState hyperState) : base(food, hyperState)
 {
 }
Beispiel #4
0
 public WoodGatherer(IWood wood, IHyperState hyperState) : base(hyperState, wood)
 {
     Name = "Wood Gatherer";
 }
Beispiel #5
0
 protected Building(IBuilder builder, IHyperState hyperState)
 {
     Builder    = builder;
     HyperState = hyperState;
 }
Beispiel #6
0
        public House(IWood wood, IBuilder builder, ITownHall townHall, IWorkerService workerService, IStoryService storyService, IHyperState hyperState) : base(builder, hyperState)
        {
            _wood          = wood;
            _builder       = builder;
            _townHall      = townHall;
            _workerService = workerService;
            _storyService  = storyService;

            BuildTime = 30_000;

            HyperState.OnChange += HyperStateOnOnChange;
            _timer = new Timer(InhabitantsCallback, null, 30_000 / HyperState.DivideBy, 30_000 / HyperState.DivideBy);
        }
Beispiel #7
0
 public Fisherman(IFood food, IHyperState hyperState) : base(hyperState, food)
 {
     Name = "Fisherman";
     AmountPer10Seconds = 10;
 }
Beispiel #8
0
        public TownHall(IWood wood, IBuilder builder, IVisibilityService visibilityService, IStoryService storyService, IHyperState hyperState, IBuilder builder1) : base(builder1, hyperState)
        {
            _wood              = wood;
            _builder           = builder;
            _visibilityService = visibilityService;
            _storyService      = storyService;

            BuildTime = 50_000;
        }