OldBlueWater/BlueWater/Assets/Blobcreate/Projectile Toolkit/Demos/Scripts/02 Battle Pro Max/TurnOffGodMode.cs
2023-08-10 17:23:04 +09:00

23 lines
369 B
C#

using Blobcreate.ProjectileToolkit.Demo;
using UnityEngine;
public class TurnOffGodMode : MonoBehaviour
{
public SimpleHealth healthComponent;
public int limitHealth = 100;
bool hasTriggered;
void Update()
{
if (Input.GetKeyDown(KeyCode.G))
{
if (hasTriggered)
return;
healthComponent.MaxHealth = limitHealth;
hasTriggered = true;
}
}
}