コード例 #1
0
 public void DecrementInt(string intName)
 {
     if (ReflectionHelper.GetFieldInfo(typeof(PlayerData), intName) != null)
     {
         ModHooks.SetPlayerInt(intName, this.GetIntInternal(intName) - 1);
     }
 }
コード例 #2
0
        public void IntAdd(string intName, int amount)
        {
            if (ReflectionHelper.GetFieldInfo(typeof(PlayerData), intName) != null)
            {
                ModHooks.SetPlayerInt(intName, this.GetIntInternal(intName) + amount);
                return;
            }

            Debug.Log("PlayerData: Could not find field named " + intName + ", check variable name exists and FSM variable string is correct.");
        }
コード例 #3
0
 public void SetInt(string intName, int value)
 {
     ModHooks.SetPlayerInt(intName, value);
 }