OnTriggerEnterGameActionTrigger.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.Collections;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using Sirenix.OdinInspector;
  6. using KairoEngine.Core;
  7. namespace KairoEngine.Core.GameActions
  8. {
  9. [System.Serializable, HideReferenceObjectPicker]
  10. public class OnTriggerEnterGameActionTrigger : GameActionTriggerBase
  11. {
  12. public override string name
  13. {
  14. get
  15. {
  16. return $"On Trigger Enter";
  17. }
  18. }
  19. public override GameActionTriggersController controller {
  20. get => _controller;
  21. set
  22. {
  23. _controller = value;
  24. typeName = "OnTriggerEnterGameActionTrigger";
  25. }
  26. }
  27. public override string GetTypeName() => "OnTriggerEnterGameActionTrigger";
  28. public override string GetTriggerName() => "On Trigger Enter";
  29. [IconFoldoutGroup("@name", "Assets/Plugins/KairoEngine/Core/Editor/Icons/OnTriggerEnterGameActionTriggerIcon.png")]
  30. public string message = "Debug Log Message";
  31. public override void OnEnable() { }
  32. public override void Update() { }
  33. public override void OnDisable() { }
  34. public static OnTriggerEnterGameActionTrigger JSONToOnTriggerEnterGameActionTrigger(string data)
  35. {
  36. return JsonUtility.FromJson<OnTriggerEnterGameActionTrigger>(data);
  37. }
  38. private OnTriggerEnterGameActionTrigger Duplicate()
  39. {
  40. OnTriggerEnterGameActionTrigger trigger = new OnTriggerEnterGameActionTrigger();
  41. trigger.controller = controller;
  42. return trigger;
  43. }
  44. }
  45. }