Class SurvivalHandler
Handler class that relates to the Survival component. Allows the defining of oxygen or health gains when consuming specific items.
public static class SurvivalHandler
- Inheritance
-
SurvivalHandler
- Inherited Members
Methods
GiveHealthOnConsume(TechType, float, bool)
makes the item Heal the player on consume.
public static void GiveHealthOnConsume(TechType techType, float healthBack, bool isEdible)
Parameters
techType
TechType- the TechType that you want it to heal back
healthBack
float- amount to heal the player
isEdible
bool- set it to true if the item is edible and has the Eatable component attached to it.
GiveOxygenOnConsume(TechType, float, bool)
makes the item gives oxygen on use.
public static void GiveOxygenOnConsume(TechType techType, float oxygenGiven, bool isEdible)
Parameters
techType
TechType- the TechType that you want to make it give oxygen on use
oxygenGiven
float- the oxygen amount the item gives
isEdible
bool- set it to true if the item is edible and has the Eatable component attached to it.
RunActionOnConsume(TechType, Action, bool)
runs a custom action on consume.
public static void RunActionOnConsume(TechType techType, Action customAction, bool isEdible)