Пример #1
0
 public BuildingJob(Sprite icon,
                    string name,
                    float totalProductionNeeded,
                    ProductionCompleteDelegate OnProductionComplete)
 {
     TotalProductionNeeded = totalProductionNeeded;
     Icon = icon;
     Name = name;
     this.OnProductionComplete = OnProductionComplete ?? throw new ArgumentNullException(nameof(OnProductionComplete));
 }
 public BuildQueueItem(
     string jobName,
     string jobDesc,
     float production,
     float productionRollover,
     ProductionCompleteDelegate onProductionComplete,
     ProductionBonusDelegate productionBonusFunc
     )
 {
     this.Name               = jobName;
     this.Description        = jobDesc;
     this.ProductionRequired = production;
     // production rollover's gotta go here somewhere
     this.OnProductionComplete = onProductionComplete;
     this.ProductionBonusFunc  = productionBonusFunc;
 }
    public BuildingJob(Image BuildingJobIcon,
                       string BuildingJobName,
                       float totalProductionNeeded,
                       float overflowedProduction,
                       ProductionCompleteDelegate OnProductionComplete,
                       ProductionBonusDelegate ProductionBonusFunc
                       )
    {
        if (OnProductionComplete == null)
        {
            throw new UnityException();
        }

        this.BuildingJobIcon       = BuildingJobIcon;
        this.BuildingJobName       = BuildingJobName;
        this.totalProductionNeeded = totalProductionNeeded;
        productionDone             = overflowedProduction;
        this.OnProductionComplete  = OnProductionComplete;
        this.ProductionBonusFunc   = ProductionBonusFunc;
    }
Пример #4
0
    public BuildingJob(
        string buildingJobName,
        float totalProductionNeeded,
        float overflowedProduction,
        ProductionCompleteDelegate OnProductionComplete,
        ProductionBonusDelegate ProductionBonusFunc
        )
    {
        if (OnProductionComplete == null)
        {
            throw new UnityException();
        }

        Debug.Log("new building job created");

        this.buildingJobName       = buildingJobName;
        this.totalProductionNeeded = totalProductionNeeded;
        productionDone             = overflowedProduction;
        this.OnProductionComplete  = OnProductionComplete;
        this.ProductionBonusFunc   = ProductionBonusFunc;
    }