Ejemplo n.º 1
0
            public void Deserialize(DataSerializer s)
            {
                AutobudgetPolice d = Singleton <AutobudgetManager> .instance.container.AutobudgetPolice;

                d.Enabled        = s.ReadBool();
                d.BudgetMinValue = s.ReadInt32();
                d.BudgetMaxValue = s.ReadInt32();
            }
Ejemplo n.º 2
0
            public void Serialize(DataSerializer s)
            {
                AutobudgetPolice d = Singleton <AutobudgetManager> .instance.container.AutobudgetPolice;

                s.WriteBool(d.Enabled);
                s.WriteInt32(d.BudgetMinValue);
                s.WriteInt32(d.BudgetMaxValue);
            }
Ejemplo n.º 3
0
        public void InitObjects()
        {
            if (AutobudgetElectricity == null)
            {
                AutobudgetElectricity = new AutobudgetElectricity();
            }
            if (AutobudgetWater == null)
            {
                AutobudgetWater = new AutobudgetWater();
            }
            if (AutobudgetHeating == null)
            {
                AutobudgetHeating = new AutobudgetHeating();
            }
            if (AutobudgetGarbage == null)
            {
                AutobudgetGarbage = new AutobudgetGarbage();
            }
            if (AutobudgetHealthcare == null)
            {
                AutobudgetHealthcare = new AutobudgetHealthcare();
            }
            if (AutobudgetEducation == null)
            {
                AutobudgetEducation = new AutobudgetEducation();
            }
            if (AutobudgetPolice == null)
            {
                AutobudgetPolice = new AutobudgetPolice();
            }
            if (AutobudgetFire == null)
            {
                AutobudgetFire = new AutobudgetFire();
            }
            if (AutobudgetIndustry == null)
            {
                AutobudgetIndustry = new AutobudgetIndustry();
            }
            if (AutobudgetRoad == null)
            {
                AutobudgetRoad = new AutobudgetRoad();
            }
            if (AutobudgetPost == null)
            {
                AutobudgetPost = new AutobudgetPost();
            }
            if (AutobudgetTaxi == null)
            {
                AutobudgetTaxi = new AutobudgetTaxi();
            }

            AllAutobudgetObjects.Clear();
            AllAutobudgetObjects.Add(AutobudgetElectricity);
            AllAutobudgetObjects.Add(AutobudgetWater);
            AllAutobudgetObjects.Add(AutobudgetHeating);
            AllAutobudgetObjects.Add(AutobudgetGarbage);
            AllAutobudgetObjects.Add(AutobudgetHealthcare);
            AllAutobudgetObjects.Add(AutobudgetEducation);
            AllAutobudgetObjects.Add(AutobudgetPolice);
            AllAutobudgetObjects.Add(AutobudgetFire);
            AllAutobudgetObjects.Add(AutobudgetIndustry);
            AllAutobudgetObjects.Add(AutobudgetRoad);
            AllAutobudgetObjects.Add(AutobudgetPost);
            AllAutobudgetObjects.Add(AutobudgetTaxi);
        }