Installed Surge, fixed compile errors, moved a bunch of external stuff into folder
This commit is contained in:
29
Assets/External/Pixelplacement/Surge/ColliderButton/Utilities/ColliderButtonInteraction.cs
vendored
Normal file
29
Assets/External/Pixelplacement/Surge/ColliderButton/Utilities/ColliderButtonInteraction.cs
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// An optional helper class that sets up a GameObject so that it can "physically" collide with a ColliderButton for input events...
|
||||
/// all this means is that is has a collider that has 'isTrigger' set to true.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class ColliderButtonInteraction : MonoBehaviour
|
||||
{
|
||||
//Init
|
||||
private void Reset()
|
||||
{
|
||||
GetComponent<Collider>().isTrigger = true;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Collider collider = GetComponent<Collider>();
|
||||
collider.isTrigger = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user