Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

//HOOK:WORLDGENERATED

// Script that kills all staff if your press F10.

using UnityEngine;

public class StaffKiller : MonoBehaviour


{
// Run every frame
void Update()
{
// Check for F10 key
if (Input.GetKeyDown(KeyCode.F10))
{
// Loop through all staff AI scripts that were found
foreach (StaffAINew SAI in FindObjectsOfType<StaffAINew>())
{
// Get the staffHP component and damage it with -1000HP
SAI.GetComponent<staffHP>().Damage(1000);
}
}
}
}

You might also like