protected void Action(GameObject target) { param.self = gameObject; actions.ForEach(a => { ActBase act = ActBase.GetAction(a.type); if (act != null) { param.param = a.param; param.obj = (a.target == ActionTarget.SELF) ? gameObject : target; act.Action(param); } }); }
protected void Action(WireControl wire, RaycastHit2D hit) { param.obj = hit.collider.gameObject; param.self = gameObject; actions.ForEach(a => { ActBase act = ActBase.GetAction(a.type); if (act != null) { param.param = a.param; act.Action(param); } }); }