puzzle-jam-ii/Assets/Scripts/RemoveOnKeypress.cs
2020-06-17 12:44:18 -05:00

14 lines
311 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RemoveOnKeypress : MonoBehaviour
{
public string keyName1;
public string keyName2;
void Update()
{
if (Input.GetKeyDown(keyName1) || Input.GetKeyDown(keyName2)) Destroy(gameObject);
}
}