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
techTypeTechType- the TechType that you want it to heal back
healthBackfloat- amount to heal the player
isEdiblebool- 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
techTypeTechType- the TechType that you want to make it give oxygen on use
oxygenGivenfloat- the oxygen amount the item gives
isEdiblebool- 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)