using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class SimplePhysicsProxy : MonoBehaviour {
    public UnityEventCollider OnTriggerEnterA;
    public UnityEventCollider OnTriggerExitA;
    public UnityEventCollision OnCollisionEnterA;
    public UnityEventCollision OnCollisionExitA;

    public void OnTriggerEnter(Collider col) {
        if(OnTriggerEnterA != null) OnTriggerEnterA.Invoke(col);
    }

    public void OnTriggerExit(Collider col) {
        if(OnTriggerExitA != null) OnTriggerExitA.Invoke(col);
    }

    public void OnCollisionEnter(Collision col) {
        if(OnCollisionEnterA != null) OnCollisionEnterA.Invoke(col);
    }

    public void OnCollisionExit(Collision col) {
        if(OnCollisionExitA != null) OnCollisionExitA.Invoke(col);
    }

    [System.Serializable]
    public class UnityEventCollider : UnityEvent<Collider> { };

    [System.Serializable]
    public class UnityEventCollision : UnityEvent<Collision> { };
}