Esempio n. 1
0
 public Population(Civilization civlization, Upkeep upkeep, Beliefs beliefs, PopulationType startingType)
 {
     Civilization   = civlization;
     Upkeep         = upkeep;
     Beliefs        = beliefs;
     PopulationType = startingType;
 }
Esempio n. 2
0
 public override void ServerInit()
 {
     base.ServerInit();
     decayVariance = UnityEngine.Random.Range(0.95f, 1f);
     decay         = PrefabAttribute.server.Find <Decay>(prefabID);
     decayPoints   = PrefabAttribute.server.FindAll <DecayPoint>(prefabID);
     upkeep        = PrefabAttribute.server.Find <Upkeep>(prefabID);
     BuildingManager.server.Add(this);
     if (!Rust.Application.isLoadingSave)
     {
         BuildingManager.server.CheckMerge(this);
     }
     lastDecayTick = UnityEngine.Time.time;
 }
Esempio n. 3
0
 public override void ServerInit()
 {
     base.ServerInit();
     this.decayVariance = Random.Range(0.95f, 1f);
     this.decay         = PrefabAttribute.server.Find <Decay>(this.prefabID);
     this.decayPoints   = PrefabAttribute.server.FindAll <DecayPoint>(this.prefabID);
     this.upkeep        = PrefabAttribute.server.Find <Upkeep>(this.prefabID);
     BuildingManager.server.Add(this);
     if (Application.isLoadingSave == null)
     {
         BuildingManager.server.CheckMerge(this);
     }
     this.lastDecayTick = Time.get_time();
 }
Esempio n. 4
0
 private IEnumerator CallUpkeep()
 {
     Upkeep.Invoke();
     yield return(null);
 }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     expand = this.GetComponent <Expansion>();
     upkeep = this.GetComponent <Upkeep>();
 }