r2mods/ilspy_dump/ror2_csproj/RoR2/VoidCoinDef.cs

23 lines
459 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2;
[CreateAssetMenu(menuName = "RoR2/MiscPickupDefs/VoidCoinDef")]
public class VoidCoinDef : MiscPickupDef
{
public override void GrantPickup(ref PickupDef.GrantContext context)
{
if ((bool)context.body.master)
{
context.body.master.GiveVoidCoins(coinValue);
context.shouldDestroy = true;
context.shouldNotify = true;
}
else
{
context.shouldNotify = false;
context.shouldDestroy = false;
}
}
}