Ejemplo n.º 1
0
 public void RunStageCompleted(int stage)
 {
     GlobalDataSaver.SetInt(string.Concat(new object[]
     {
         base.transform.ToGeoHash(),
         "_",
         stage,
         "_completed"
     }), 1);
     for (int i = 0; i <= stage; i++)
     {
         if (!this._stages[i]._completed)
         {
             this._stages[i]._completed = true;
             if (!this._isActor)
             {
                 this._stages[i]._spectatorsCompletedActions.Invoke();
             }
         }
     }
     if (this._stage == stage && this._isActor)
     {
         this._isActor = false;
     }
 }
Ejemplo n.º 2
0
        private void Start()
        {
            spawnMutants component = base.GetComponent <spawnMutants>();
            int          @int      = GlobalDataSaver.GetInt("sm_male_skinny_" + this._dataKey, -1337);

            if (@int > -1337)
            {
                component.amount_male_skinny = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_female_skinny_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_female_skinny = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_skinny_pale_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_skinny_pale = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_male_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_male = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_female_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_female = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_fireman_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_fireman = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_pale_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_pale = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_armsy_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_armsy = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_vags_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_vags = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_baby_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_baby = @int;
            }
            @int = GlobalDataSaver.GetInt("sm_fat_" + this._dataKey, -1337);
            if (@int > -1337)
            {
                component.amount_fat = @int;
            }
        }
Ejemplo n.º 3
0
 private void OnDestroy()
 {
     if (GlobalDataSaver.Instance == this)
     {
         GlobalDataSaver.Instance = null;
     }
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     GlobalDataSaver.Instance = this;
     this._intData            = new Dictionary <string, int>(1000);
     this._floatData          = new Dictionary <string, float>();
     this._stringData         = new Dictionary <string, string>();
     this._longIntData        = new Dictionary <long, int>(200);
     this._longFloatData      = new Dictionary <long, float>();
     this._longStringData     = new Dictionary <long, string>();
 }
Ejemplo n.º 5
0
        private void Start()
        {
            switch (this._dataType)
            {
            case GlobalDataSaver.DataTypes.Int:
                base.SendMessage(this._message, GlobalDataSaver.GetInt(this._dataName, 0));
                break;

            case GlobalDataSaver.DataTypes.Float:
                base.SendMessage(this._message, GlobalDataSaver.GetFloat(this._dataName, 0f));
                break;

            case GlobalDataSaver.DataTypes.String:
                base.SendMessage(this._message, GlobalDataSaver.GetString(this._dataName, string.Empty));
                break;
            }
        }
Ejemplo n.º 6
0
 private void OnSerializing()
 {
     if (!Cheats.NoEnemies && !Cheats.NoEnemiesDuringDay)
     {
         spawnMutants component = base.GetComponent <spawnMutants>();
         GlobalDataSaver.SetInt("sm_male_skinny_" + this._dataKey, component.amount_male_skinny);
         GlobalDataSaver.SetInt("sm_female_skinny_" + this._dataKey, component.amount_female_skinny);
         GlobalDataSaver.SetInt("sm_skinny_pale_" + this._dataKey, component.amount_skinny_pale);
         GlobalDataSaver.SetInt("sm_male_" + this._dataKey, component.amount_male);
         GlobalDataSaver.SetInt("sm_female_" + this._dataKey, component.amount_female);
         GlobalDataSaver.SetInt("sm_fireman_" + this._dataKey, component.amount_fireman);
         GlobalDataSaver.SetInt("sm_pale_" + this._dataKey, component.amount_pale);
         GlobalDataSaver.SetInt("sm_armsy_" + this._dataKey, component.amount_armsy);
         GlobalDataSaver.SetInt("sm_vags_" + this._dataKey, component.amount_vags);
         GlobalDataSaver.SetInt("sm_baby_" + this._dataKey, component.amount_baby);
         GlobalDataSaver.SetInt("sm_fat_" + this._dataKey, component.amount_fat);
     }
 }
Ejemplo n.º 7
0
        private IEnumerator DelayedAwake()
        {
            while (!Prefabs.Instance)
            {
                yield return(null);
            }
            try
            {
                this.Proxy = AnimationSequence.GetProxyFor(base.transform.position);
                if (this.Proxy)
                {
                    this.Proxy.SetSequence(this);
                }
            }
            catch (Exception exception)
            {
                Debug.LogException(exception);
            }
            if (GameSetup.IsSavedGame && !BoltNetwork.isClient)
            {
                while (LevelSerializer.IsDeserializing || (BoltNetwork.isRunning && !this.Proxy))
                {
                    yield return(null);
                }
                yield return(null);

                for (int i = 0; i <= this._stages.Length; i++)
                {
                    bool flag = GlobalDataSaver.GetInt(string.Concat(new object[]
                    {
                        base.transform.ToGeoHash(),
                        "_",
                        i,
                        "_completed"
                    }), 0) == 1;
                    if (flag)
                    {
                        this.RunStageCompletedMp(i);
                    }
                }
            }
            yield break;
        }
Ejemplo n.º 8
0
        private IEnumerator Start()
        {
            while (!GlobalDataSaver.Ready)
            {
                yield return(null);
            }
            if (BoltNetwork.isRunning)
            {
                BoltEntity entity = base.GetComponentInParent <BoltEntity>();
                if (entity)
                {
                    while (!entity.isAttached)
                    {
                        yield return(null);
                    }
                }
            }
            switch (this._dataType)
            {
            case GlobalDataSaver.DataTypes.Int:
                base.SendMessage(this._message, GlobalDataSaver.GetInt(this._dataName, 0));
                break;

            case GlobalDataSaver.DataTypes.Float:
                base.SendMessage(this._message, GlobalDataSaver.GetFloat(this._dataName, 0f));
                break;

            case GlobalDataSaver.DataTypes.String:
                base.SendMessage(this._message, GlobalDataSaver.GetString(this._dataName, string.Empty));
                break;

            case GlobalDataSaver.DataTypes.Long:
                base.SendMessage(this._message, GlobalDataSaver.GetLong(this._dataName, 0L));
                break;
            }
            yield break;
        }
Ejemplo n.º 9
0
 public void ClearLongData()
 {
     GlobalDataSaver.ClearLong(this._dataName);
 }
Ejemplo n.º 10
0
 public void ClearFloatData()
 {
     GlobalDataSaver.ClearFloat(this._dataName);
 }
Ejemplo n.º 11
0
 public void SetLongData(long value)
 {
     GlobalDataSaver.SetLong(this._dataName, value);
 }
Ejemplo n.º 12
0
 public void SetStringData(string value)
 {
     GlobalDataSaver.SetString(this._dataName, value);
 }
Ejemplo n.º 13
0
 public void SetFloatData(float value)
 {
     GlobalDataSaver.SetFloat(this._dataName, value);
 }
Ejemplo n.º 14
0
 public void SetIntData(int value)
 {
     GlobalDataSaver.SetInt(this._dataName, value);
 }
Ejemplo n.º 15
0
 private void OnDestroy()
 {
     if (GlobalDataSaver.Instance == this)
     {
         GlobalDataSaver.Instance = null;
     }
 }
Ejemplo n.º 16
0
 private void Awake()
 {
     GlobalDataSaver.Instance = this;
     this._intData = new Dictionary<string, int>(1000);
     this._floatData = new Dictionary<string, float>();
     this._stringData = new Dictionary<string, string>();
     this._longIntData = new Dictionary<long, int>(200);
     this._longFloatData = new Dictionary<long, float>();
     this._longStringData = new Dictionary<long, string>();
 }