void ClearTrackers() { res = null; com = null; ind = null; off = null; indc = null; fol = null; serv = null; tracker = null; }
void SetTracker() { ClearTrackers(); tracker = containedBuilding.GetComponent <ItemTracker>(); if (containedType == 0) { res = containedBuilding.GetComponent <ResidentialTracker>(); res.usable = false; } else if (containedType == 1) { com = containedBuilding.GetComponent <CommercialTracker>(); com.usable = false; } else if (containedType == 2) { ind = containedBuilding.GetComponent <IndustrialTracker>(); ind.usable = false; } else if (containedType == 3) { off = containedBuilding.GetComponent <CommercialTracker>(); off.usable = false; } else if (containedType == 4) { indc = containedBuilding.GetComponent <IndustrialComponent>(); indc.usable = false; } else if (containedType == 5) { fol = containedBuilding.GetComponent <FoliageTracker>(); fol.active = false; } else if (containedType == 6) { serv = containedBuilding.GetComponent <ServiceTrackerBase>(); serv.active = true; } }
protected override void Start() { base.Start(); serviceTracker = GetComponent <ServiceTrackerBase>(); }