mirror of
https://github.com/ConjureETS/MTI860_VR_Multi_Controller.git
synced 2026-03-24 12:31:15 +00:00
31 lines
734 B
C#
31 lines
734 B
C#
using Assets.Scripts.Utilities;
|
|
using UnityEngine;
|
|
|
|
namespace Assets.Scripts.HammerScript
|
|
{
|
|
public class HammerTrigger : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
gameObject.tag = Constant.GT_HAMMER;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
//Debug.Log("Hammer detected the colision");
|
|
if (other.gameObject.tag == Constant.GT_TARGET)
|
|
{
|
|
Executable ex = other.gameObject.GetComponent("Executable") as Executable;
|
|
ex.Execute();
|
|
}
|
|
}
|
|
}
|
|
}
|