Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using UnityEngine;
- using F45.Utilities;
- namespace F45.Flow
- {
- [RequireComponent(typeof(Managed))]
- public abstract class ManagedStateMachine<T> : StateMachine
- where T : Behaviour
- {
- public static IEnumerable<T> List => Managed.GetAll<T>();
- }
- }
- // Allows doing this:
- //
- // public class AgarPlate : ManagedStateMachine<AgarPlate>
- // ...
- // if (AgarPlate.List.All(a => a. Open))
- //
- // Instead of this:
- //
- // public class AgarPlate : StateMachine
- // ...
- // if (Managed.GetAll<AgarPlate>.All(a => a. Open))
Add Comment
Please, Sign In to add comment