示例#1
0
        public static void OnCasingsChangedHook(Action <PlayerConsumables, int> orig, PlayerConsumables self, int Money)
        {
            orig(self, Money);
            PlayerController player = GetPlayerFromConsumables(self);

            DaveAPIManager.UpdateMaximum(CustomTrackedMaximums.MOST_MONEY, Money);
            if (player && player.GetComponent <PrismaticEvents>())
            {
                player.GetComponent <PrismaticEvents>().OnCasingsChanged?.Invoke(Money);
            }
        }
示例#2
0
 public static void MaxHealthStatAdder(Action <PlayerStats, PlayerController> action, PlayerStats origStats, PlayerController owner)
 {
     action(origStats, owner);
     DaveAPIManager.UpdateMaximum(CustomTrackedMaximums.MAXIMUM_HEALTH, owner.stats.GetStatValue(PlayerStats.StatType.Health));
     DaveAPIManager.UpdateMaximum(CustomTrackedMaximums.MAXIMUM_DAMAGE, owner.stats.GetStatValue(PlayerStats.StatType.Damage));
 }