public void Update(Requirements other) { if(!other) return; if(resource == null) resource = other.resource; if(resource.id == other.resource.id) { work += other.work; energy += other.energy; resource_amount += other.resource_amount; resource_mass += other.resource_mass; } }
public void Clear() { work = energy = resource_mass = resource_amount = 0; resource = null; }
public JobStage(int i = 0, ResourceUsageInfo res = null) { Index = i; Resource = res; }