Move scripts to Scripts folder

This commit is contained in:
Gabriel Le Breton
2020-10-08 10:26:37 -04:00
parent d8a020a4d6
commit 981f4577ee
5 changed files with 8 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
public class OnCollisionEnterEvent : MonoBehaviour
{
[SerializeField] private UnityEvent @event;
[SerializeField] private string otherGameObjectName = "Sphere";
private void OnCollisionEnter(Collision other)
{
if (other.gameObject.name == otherGameObjectName)
{
@event.Invoke();
}
}
}