Risk of Rain 2

Details

Last Updated
6 days ago
First Uploaded
6 days ago
Downloads
57K
Likes
0
Size
59KB
Dependency string
Brynzananas-Revive_API-1.3.1
Dependants

Categories

How to use

Use these methods:

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, int priority)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, OnReviveNewDelegate onReviveDelegate)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, OnReviveNewDelegate onReviveDelegate, int priority)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, PendingOnRevive[] pendingOnRevives)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, PendingOnRevive[] pendingOnRevives, int priority)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, OnReviveNewDelegate onReviveDelegate, PendingOnRevive[] pendingOnRevives)

AddCustomRevive(CanReviveNewDelegate canReviveNewDelegate, OnReviveNewDelegate onReviveDelegate, PendingOnRevive[] pendingOnRevives, int priority)

In CanReviveNewDelegate canReviveNewDelegate parameter put boolean method/delegate with CharacterMaster and out CanReviveInfo parameters that will determine if CharacterMaster is able to respawn on death with your custom condition. A necessary value.

In OnReviveNewDelegate onReviveNewDelegate parameter put void method/delegate with CharacterMaster and CanReviveInfo parameters that will run after death and if CharacterMaster is able to respawn with your custom condition. For example Dio's Best friends takes an item on the begininng of respawn. Put a similar method in this value.

In PendingOnRevive[] pendingOnRevives parameter put an array of PendingOnRevive classes that will run them after reviving after a specified amount of time. This is for itemless custom revives, otherwise set this parameter to null and do pending stuff via adding CharacterMaster.ExtraLifeServerBehavior component to master object. By default there is a simple revive method and a simple sfx sound maker method in this array.

In int priority parameter put value to determine your revive priority among base and custom revives. Values above zero run before vanilla, values below and equal to zero run after vanilla.

PendingOnRevive has two fields, float timer and OnReviveDelegate onReviveDelegate. float timer will determine after how much time OnReviveDelegate onReviveDelegate will invoke.

CanReviveInfo has just one field, Inventory.ItemTransformation.CanTakeResult canTakeResult. You can check test revives in the Github repository for item based custom revive examples. You can pass any information from CanCheck to OnRevive via creating new class that inherits from CanReviveInfo.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.