mirror of
https://github.com/ConjureETS/MTI860_VR_Multi_Controller.git
synced 2026-03-24 04:21:15 +00:00
29 lines
580 B
C#
29 lines
580 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class HammerTrigger : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
Debug.Log("Hello: " + other.name);
|
|
if (other.gameObject.tag == "Target")
|
|
{
|
|
Executable ex = other.gameObject.GetComponent("Executable") as Executable;
|
|
ex.Execute();
|
|
}
|
|
}
|
|
}
|