OldBlueWater/BlueWater/Assets/Blobcreate/Projectile Toolkit/Demos/Scripts/02 Battle Pro Max/TurnOffGodMode.cs

23 lines
369 B
C#
Raw Normal View History

2023-08-10 08:23:04 +00:00
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;
}
}
}