public override void OnEnter() { _proxy = (PlayMakerUnity2DProxy)this.Owner.GetComponent <PlayMakerUnity2DProxy>(); if (_proxy == null) { Debug.LogWarning("Missing PlayMakerUnity2DProxy Component. THIS IS A COSTLY OPERATION, prefer adding this component manually"); _proxy = this.Owner.AddComponent <PlayMakerUnity2DProxy>(); } switch (trigger) { case PlayMakerUnity2d.Trigger2DType.OnTriggerEnter2D: _proxy.AddOnTriggerEnter2dDelegate(this.DoTriggerEnter2D); break; case PlayMakerUnity2d.Trigger2DType.OnTriggerStay2D: _proxy.AddOnTriggerStay2dDelegate(this.DoTriggerStay2D); break; case PlayMakerUnity2d.Trigger2DType.OnTriggerExit2D: _proxy.AddOnTriggerExit2dDelegate(this.DoTriggerExit2D); break; } }
public override void OnEnter() { _proxy = (PlayMakerUnity2DProxy)this.Owner.GetComponent <PlayMakerUnity2DProxy>(); if (_proxy == null) { _proxy = this.Owner.AddComponent <PlayMakerUnity2DProxy>(); } switch (trigger) { case PlayMakerUnity2d.Trigger2DType.OnTriggerEnter2D: _proxy.AddOnTriggerEnter2dDelegate(this.DoTriggerEnter2D); break; case PlayMakerUnity2d.Trigger2DType.OnTriggerStay2D: _proxy.AddOnTriggerStay2dDelegate(this.DoTriggerStay2D); break; case PlayMakerUnity2d.Trigger2DType.OnTriggerExit2D: _proxy.AddOnTriggerExit2dDelegate(this.DoTriggerExit2D); break; } }