Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ActionObject : GameComponent
- {
- public static List<ActionObject> ActionObjects;
- [SerializeField]
- protected int maxActionPoints;
- [SerializeField]
- protected int actionPoints;
- public bool canAct = true;
- void OnEnable()
- {
- if(ActionObjects == null) ActionObjects = new List<ActionObject>();
- if(!ActionObjects.Contains(this)) ActionObjects.Add(this);
- }
- void OnDisable()
- {
- if(ActionObjects.Contains(this)) ActionObjects.Remove(this);
- }
- }
- public class TurnHandler : GameComponent
- {
- private int turnNumber = 0;
- private bool allMoved = false;
- public void HowMany()
- {
- Debug.Log("Number of action objects: " + ActionObject.ActionObjects.Count);
- }
- private void Start()
- {
- HowMany();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement