Move scripts to Scripts folder
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be4907e9cc9c54b219b223b53a32836c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class YouWin : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject gameObjectToEnable;
|
||||
|
||||
public void Run()
|
||||
{
|
||||
gameObjectToEnable.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf8b8b4d9aab540ccb2b4caa1443dfe7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user