public void StartWork(int duration) { Console.WriteLine($"User {this.name} with skill-level {this.skillLevel} started to work "); OnWork?.Invoke(duration); if (duration > 5000) { skillLevel++; OnUpgrade?.Invoke(1); } }
public void Work(int amount) { Console.WriteLine($"{Name} выполнил {amount} работы"); if (OnWork != null) { OnWork.Invoke(new WorkerEventArgument() { Name = this.Name, WorkAmount = amount }); } }
public ActionNode(OnWork onWork) { _onWork = onWork; }
public void Plugin(OnWork onEnable, OnWork onDisable, OnWorkTick onUpdate) { WorkManager.Work work = new WorkManager.Work(onEnable, onUpdate, onDisable); work.Enable(); this.queTasker.Enqueue(work); }
public Work(OnWork onEnable, OnWorkTick onUpdate, OnWork onDisable) { this.OnEnable = onEnable; this.OnUpdate = onUpdate; this.OnDisable = onDisable; }