Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This was made in 2017
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public delegate void OnTrapHit();
- public class PlayerController : MonoBehaviour
- {
- [SerializeField]
- Transform m_spawnpoint;
- void Start()
- {
- Reset();
- }
- public void Reset()
- {
- transform.position = m_spawnpoint.position;
- }
- public void OnTriggerEnter(Collider other)
- {
- if (other.CompareTag("Trap"))
- {
- Debug.Log("IK BEN GERAAKT!!!");
- other.gameObject.GetComponentInParent<Trap>().Reset();
- Reset();
- }
- }
- }
Add Comment
Please, Sign In to add comment