Ejemplo n.º 1
0
    void SendEvent(BezierZone zone, BezierZoneEventType eventType)
    {
        MonoBehaviour component  = zone;
        var           type       = component.GetType();
        var           methodInfo = type.GetMethod("OnBezierZoneEvent");

        if (methodInfo == null)
        {
            Debug.LogWarning(zone + " is missing OnBezierZoneEvent");
        }
        else
        {
            //Debug.Log(eventType + ": " + this + " -> " + zone);
            methodInfo.Invoke(component, new object[] {
                new BezierZoneEvent(zone, this, eventType)
            });
        }
    }
Ejemplo n.º 2
0
 public BezierZoneEvent(BezierZone zone, BezierPoint point, BezierZoneEventType type)
 {
     this.zone  = zone;
     this.point = point;
     this.type  = type;
 }