public ProduceTech(ProduceTech tech) { canProduce = tech.canProduce; cost = tech.cost; customTexture = tech.customTexture; customName = tech.customName; dur = tech.dur; rate = tech.rate; amount = tech.amount; curDur = 0; index = tech.index; techName = tech.techName; lastTime = 0; }
// Group Buildings Technology (Production) void ModifyGBT(int nl, int ol, int curLoc) { BuildingController buildCont = nTarget.buildingList[unitId].obj.GetComponent<BuildingController>(); ProduceTech[] copyArr = new ProduceTech[ol]; for(int x = 0; x < copyArr.Length; x++){ copyArr[x] = buildCont.techProduction.techs[x]; } buildCont.techProduction.techs = new ProduceTech[nl]; int y = 0; if(nl < ol){ for(int x = 0; x < copyArr.Length; x++){ if(x != curLoc){ buildCont.techProduction.techs[y] = copyArr[x]; y++; } } } else{ for(int x = 0; x < buildCont.techProduction.techs.Length; x++){ if(x != curLoc+1){ buildCont.techProduction.techs[x] = copyArr[y]; y++; } } } }