Esempio n. 1
0
    private void gs(string[] param)
    {
        BindingFlags bindingAttr = BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
        FieldInfo    field       = typeof(GlobalSettings).GetField(param[1], bindingAttr);

        if (field != null)
        {
            this._setFieldValue(field, GlobalSettings.Instance, param[2]);
            return;
        }
        FieldInfo[] fields = typeof(GlobalSettings).GetFields(bindingAttr);
        FieldInfo[] array  = fields;
        for (int i = 0; i < array.Length; i++)
        {
            FieldInfo fieldInfo = array[i];
            Type      fieldType = fieldInfo.FieldType;
            if (fieldType.IsClass)
            {
                FieldInfo field2 = fieldType.GetField(param[1], bindingAttr);
                if (field2 != null)
                {
                    object value = fieldInfo.GetValue(GlobalSettings.Instance);
                    this._setFieldValue(field2, value, param[2]);
                    Cheat.Msg(new object[]
                    {
                        "GlobalSettings.SetField: ",
                        param[1],
                        " = ",
                        param[2]
                    });
                    return;
                }
            }
        }
    }
Esempio n. 2
0
 private void setDPI(string[] param)
 {
     Cheat.Msg(string.Concat(new object[]
     {
         "Screen: ",
         Screen.width,
         " ",
         Screen.height,
         " ",
         Screen.currentResolution.refreshRate
     }));
     if (param.Length > 3)
     {
         Screen.SetResolution(int.Parse(param[1]), int.Parse(param[2]), true, int.Parse(param[3]));
     }
     else
     {
         Screen.SetResolution(int.Parse(param[1]), int.Parse(param[2]), true);
     }
     Cheat.Msg(string.Concat(new object[]
     {
         "To: ",
         Screen.width,
         " ",
         Screen.height,
         " ",
         Screen.height,
         " ",
         Screen.currentResolution.refreshRate
     }));
 }
Esempio n. 3
0
 private void showDPI(string[] param)
 {
     Cheat.Msg(new object[]
     {
         "curDPI: ",
         Screen.dpi
     });
 }
Esempio n. 4
0
 private void SetMoveDelay(string[] param)
 {
     if (param.Length > 2)
     {
         float speed = (param.Length <= 3) ? 0f : float.Parse(param[3]);
         FrameSyncManager.Instance.setDelayTime(float.Parse(param[1]), float.Parse(param[2]), speed);
         Cheat.Msg(this.mCheatCode);
     }
 }
Esempio n. 5
0
 public static void Msg(params object[] output)
 {
     for (int i = 0; i < output.Length; i++)
     {
         if (output[i] != null)
         {
             Cheat.mCacheString.Append(output[i]);
         }
         else
         {
             Cheat.mCacheString.Append("null");
         }
     }
     Cheat.Msg(Color.white, Cheat.mCacheString.ToString());
     Cheat.mCacheString.Length = 0;
 }
Esempio n. 6
0
 private void testMemory(string[] param)
 {
     Cheat.Msg(new object[]
     {
         "TotalAllocatedMemory: ",
         Profiler.GetTotalAllocatedMemory()
     });
     Cheat.Msg(new object[]
     {
         "TotalReservedMemory: ",
         Profiler.GetTotalReservedMemory()
     });
     Cheat.Msg(new object[]
     {
         "TotalUnusedReservedMemory: ",
         Profiler.GetTotalUnusedReservedMemory()
     });
 }
Esempio n. 7
0
 private void _log(DLog.EndLine output)
 {
     if (this.UseScreenLogOut)
     {
         Cheat.Msg(this.mCacheString.ToString());
     }
     if (this.UseSystemDebug)
     {
         UnityEngine.Debug.Log(this.mCacheString);
     }
     else
     {
         this.mCacheString.Append('\n');
         string s = this.mCacheString.ToString();
         DLog.mCurFile.Write(Encoding.Default.GetBytes(s), 0, Encoding.Default.GetByteCount(s));
         DLog.mCurFile.Flush();
     }
     this.mCacheString.Length = 0;
 }
Esempio n. 8
0
 private void logpath(string[] param)
 {
     Cheat.Msg(Application.persistentDataPath);
 }
Esempio n. 9
0
 public static void Msg(string output)
 {
     Cheat.Msg(Color.white, output);
 }