You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.0 KiB
57 lines
1.0 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class trigger : MonoBehaviour
|
|
{
|
|
public GameObject canvas;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnTriggerStay(Collider other)
|
|
{
|
|
Debug.Log("Trigger Stay");
|
|
if (Input.GetKeyDown(KeyCode.R))
|
|
{
|
|
this.GetComponent<MagicStep>().activated = true;
|
|
}
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
Debug.Log("Trigger enter!!!!!!!!!!!!!!!!!!!!!!!");
|
|
canvas.SetActive(true);
|
|
}
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
Debug.Log("Trigger exit@@@@@@@@@@@@@@@@@@@@@@@@@");
|
|
canvas.SetActive(false);
|
|
}
|
|
|
|
private void OnCollisionEnter(Collision collision)
|
|
{
|
|
|
|
}
|
|
|
|
private void OnCollisionExit(Collision collision)
|
|
{
|
|
|
|
}
|
|
|
|
private void OnCollisionStay(Collision collision)
|
|
{
|
|
|
|
}
|
|
}
|