Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. //--------------------------------------------------------------
  2. // _______ _____ __ ________
  3. // | ___ \ / \ | | |___ ___|
  4. // | | \ | / ___ \ | | / /
  5. // | |___/ / / / \ \ | | / /_
  6. // | | \ \ \ \___/ / | | /_ /
  7. // | |___/ | \ / | |____ | /
  8. // |_______/ \_____/ |_______| |/
  9. //
  10. // V I S U A L S C R I P T I N G
  11. //--------------------------------------------------------------
  12. //
  13. // THIS FILE IS AUTO-GENERATED.
  14. //
  15. // ANY CHANGES WILL BE LOST NEXT TIME THIS SCRIPT IS GENERATED.
  16. //
  17. //--------------------------------------------------------------
  18. #pragma warning disable 162, 168, 219, 429
  19.  
  20. using Bolt;
  21. using Ludiq;
  22. using Ludiq.Bolt;
  23. using System;
  24. using System.Collections;
  25. using System.Collections.Generic;
  26. using System.Linq;
  27. using UnityEngine;
  28.  
  29. namespace Bolt.Generated
  30. {
  31. public class NewFlowMacroGraphScript : FlowGraphScript
  32. {
  33. private EventHook startHook;
  34. private Action<EmptyEventArgs> startHandler;
  35. private EventHook updateHook;
  36. private Action<EmptyEventArgs> updateHandler;
  37.  
  38. public NewFlowMacroGraphScript(IMachineScript machineScript) : base(machineScript) { }
  39.  
  40. public override FlowGraphData graphData
  41. {
  42. get => _graphData;
  43. set
  44. {
  45. _graphData = value;
  46. }
  47. }
  48.  
  49. public void Start()
  50. {
  51. gameObject.SetActive(false);
  52. }
  53.  
  54. public void Update()
  55. {
  56. gameObject.SetActive(false);
  57. }
  58.  
  59. public override void StartListening()
  60. {
  61. base.StartListening();
  62. startHook = new EventHook("Start", machineScript);
  63. startHandler = args => Start();
  64. EventBus.Register(startHook, startHandler);
  65. updateHook = new EventHook("Update", machineScript);
  66. updateHandler = args => Update();
  67. EventBus.Register(updateHook, updateHandler);
  68. }
  69.  
  70. public override void StopListening()
  71. {
  72. base.StopListening();
  73. EventBus.Unregister(startHook, startHandler);
  74. startHandler = null;
  75. EventBus.Unregister(updateHook, updateHandler);
  76. updateHandler = null;
  77. }
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement