|
|
|
|
|
|
[ReorderableList] |
|
|
|
public Callable[] onTriggerExit; |
|
|
|
|
|
|
|
[ReorderableList] |
|
|
|
public Callable[] onTriggerStay; |
|
|
|
|
|
|
|
[EnableIf("OnlyInteractWithTag")] |
|
|
|
public string Tag = "Player"; |
|
|
|
|
|
|
|
private void OnTriggerEnter(Collider other) |
|
|
|
|
|
|
if (!OnlyInteractWithTag) |
|
|
|
{ |
|
|
|
Callable.Call(onTriggerExit, other.gameObject); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void OnTriggerSta�(Collider other) |
|
|
|
{ |
|
|
|
if (OnlyInteractWithTag && other.tag == Tag) |
|
|
|
{ |
|
|
|
Callable.Call(onTriggerStay, other.gameObject); |
|
|
|
} |
|
|
|
if (!OnlyInteractWithTag) |
|
|
|
{ |
|
|
|
Callable.Call(onTriggerStay, other.gameObject); |
|
|
|
} |
|
|
|
} |
|
|
|
} |