Initial commit
This commit is contained in:
28
Assets/Low Poly Animated People/- Scripts/KillSwitch.cs
Normal file
28
Assets/Low Poly Animated People/- Scripts/KillSwitch.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PolyPerfect
|
||||
{
|
||||
public class KillSwitch : MonoBehaviour
|
||||
{
|
||||
|
||||
Animator anim;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
|
||||
anim = GetComponent<Animator>();
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Alpha1))
|
||||
anim.SetBool("isDead", true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user