MenuAction.cs 552 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Sirenix.OdinInspector;
  5. using KairoEngine.Core.GameActions;
  6. namespace KairoEngine.UI
  7. {
  8. [System.Serializable]
  9. public class MenuAction
  10. {
  11. [FoldoutGroup("@title")] public string title = "action_name";
  12. [FoldoutGroup("@title"), InlineProperty, HideLabel] public GameActionsController actionsController;
  13. public void Execute()
  14. {
  15. actionsController.Restart();
  16. actionsController.Start();
  17. }
  18. }
  19. }