unity-atoms/Packages/Core/Runtime/Actions/AtomAction.cs

30 lines
772 B
C#
Raw Normal View History

using System;
2018-10-30 15:05:06 -04:00
using UnityEngine;
namespace UnityAtoms
{
2019-10-15 13:19:44 -04:00
/// <summary>
/// Base abstract class for Actions. Inherits from `BaseAtom`.
/// </summary>
public abstract class AtomAction : BaseAtom
{
/// <summary>
/// Perform the Action.
/// </summary>
2020-03-08 19:16:40 -04:00
public virtual void Do() { }
}
/// <summary>
/// Generic abstract base class for Actions. Inherits from `AtomAction`.
2019-10-15 13:19:44 -04:00
/// </summary>
/// <typeparam name="T1">The type for this Action.</typeparam>
public abstract class AtomAction<T1> : AtomAction
2018-10-30 15:05:06 -04:00
{
2019-10-15 14:44:25 -04:00
/// <summary>
/// Perform the Action.
/// </summary>
/// <param name="t1">The first parameter.</param>
2020-03-08 19:16:40 -04:00
public virtual void Do(T1 t1) => base.Do();
2018-10-30 15:05:06 -04:00
}
}