14 lines
311 B
C#
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);
|
|
}
|
|
}
|