public Deployment(string name, Region destination, IDeployable deployable, CostOfStage cost) : base(name, cost) { DeployableObject = deployable; Destination = destination; Cost = cost; }
public static List <Transportation> Create(string name, IDeployable deployable, Region from, Region to, CostOfStage cost) { var list = new List <Transportation>(); var route = Misc.ShortestPath(from, to); var iter = route.First; Transportation prev = null; while (iter.Next != null) { Transportation transportation; transportation = new Transportation($"Transferring {deployable} to a new destination: {to}", deployable, iter.Next.Value, ResourceManager.GetCostOf(nameof(Installation), TypesOfCostOfStage.Transportation)); if (prev != null) { prev._AfterCompleted = p => transportation.IsPending = false; } list.Add(transportation); prev = transportation; iter = iter.Next; } return(list); }
public Transportation(string name, IDeployable deployable, Region nextStop, CostOfStage cost, Action <Transportation> afterCompleted = null) : base(name, cost) { Name = name; Cargo = deployable; Cost = cost; NextStop = nextStop; IsPending = true; _AfterCompleted = afterCompleted; }
// Any object that is manufactured will not be automatically added to anywhere. // Its destination should always be explicitly stated. // e.g. send it to reserve public Manufacture(string name, Func <IDestroyable> produce, CostOfStage cost, Action <Manufacture> afterCompleted = null) : base(name, cost) { _Produce = produce; _AfterCompleted = afterCompleted; }
public Policy(string name, CostOfStage cost, Action action) : base(name, cost) { _Action = action; }
protected Task(string name, CostOfStage cost) { GameManager.TimeElapsed += AdvanceProgress; Name = name; Cost = cost; }