You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
528 B
C#
21 lines
528 B
C#
using D2D.Utilities;
|
|
using UnityEngine;
|
|
|
|
namespace D2D
|
|
{
|
|
public abstract class OnceMultiObjectInteractor : OnceObjectInteractorBase
|
|
{
|
|
protected override void CheckInteraction(GameObject other)
|
|
{
|
|
if (!isObjectInside && CanInteract(other))
|
|
{
|
|
isObjectInside = true;
|
|
OnInteract(other.gameObject);
|
|
}
|
|
}
|
|
|
|
public abstract bool CanInteract(GameObject other);
|
|
|
|
protected abstract void OnInteract(GameObject other);
|
|
}
|
|
} |