示例#1
0
 public static void ApplyEffectsToStats(StatEffect[] effects, bool forward)
 {
     if (effects.Length > 0)
     {
         for (int i = 0; i < effects.Length; i++)
         {
             ItemUtils.ApplyEffectsToStats(effects[i], forward);
         }
     }
 }
示例#2
0
        public static bool ApplyEffectsToStats(StatEffect[] effects, bool forward, int times = 1)
        {
            bool result = false;

            if (effects != null && effects.Length > 0)
            {
                for (int i = 0; i < times; i++)
                {
                    for (int j = 0; j < effects.Length; j++)
                    {
                        if (ItemUtils.ApplyEffectsToStats(effects[j], forward))
                        {
                            result = true;
                        }
                    }
                }
            }
            return(result);
        }
示例#3
0
        public static GameObject SpawnItem(string itemName, Vector3 position, Quaternion rotation, bool avoidImpacts = false)
        {
            int itemId = ItemDatabase.ItemIdByName(itemName);

            return(ItemUtils.SpawnItem(itemId, position, rotation, avoidImpacts));
        }