mirror of
https://github.com/Mukheem/DET-SoulSphere.git
synced 2025-12-06 19:22:34 +01:00
20 lines
628 B
C#
20 lines
628 B
C#
using UnityEngine;
|
|
[RequireComponent(typeof(SphereCollider))]
|
|
public class SingularityCore : MonoBehaviour
|
|
{
|
|
//This script is responsible for what happens when the pullable objects reach the core
|
|
//by default, the game objects are simply turned off
|
|
//as this is much more performant than destroying the objects
|
|
void OnTriggerStay (Collider other) {
|
|
if(other.GetComponent<SingularityPullable>()){
|
|
other.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
void Awake(){
|
|
if(GetComponent<SphereCollider>()){
|
|
GetComponent<SphereCollider>().isTrigger = true;
|
|
}
|
|
}
|
|
}
|