using System; using UnityEngine; namespace UnityAtoms { [UseIcon("atom-icon-purple")] public abstract class AtomAction : BaseAtom, IAtomActionIcon { [HideInInspector] public Action Action; public virtual void Do(T1 t1) { if (Action != null) { Action(t1); return; } throw new Exception("Either set Action or override the Do method."); } } [UseIcon("atom-icon-purple")] public abstract class AtomAction : BaseAtom, IAtomActionIcon { [HideInInspector] public Action Action; public virtual void Do(T1 t1, T2 t2) { if (Action != null) { Action(t1, t2); return; } throw new Exception("Either set Action or override the Do method."); } } [UseIcon("atom-icon-purple")] public abstract class AtomAction : BaseAtom, IAtomActionIcon { [HideInInspector] public Action Action; public virtual void Do(T1 t1, T2 t2, T3 t3) { if (Action != null) { Action(t1, t2, t3); return; } throw new Exception("Either set Action or override the Do method."); } } [UseIcon("atom-icon-purple")] public abstract class AtomAction : BaseAtom, IAtomActionIcon { [HideInInspector] public Action Action; public virtual void Do(T1 t1, T2 t2, T3 t3, T4 t4) { if (Action != null) { Action(t1, t2, t3, t4); return; } throw new Exception("Either set Action or override the Do method."); } } [UseIcon("atom-icon-purple")] public abstract class AtomAction : BaseAtom, IAtomActionIcon { [HideInInspector] public Action Action; public virtual void Do(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { if (Action != null) { Action(t1, t2, t3, t4, t5); return; } throw new Exception("Either set Action or override the Do method."); } } }