Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 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 MyFlowGraphScript : FlowGraphScript
  32. {
  33. private EventHook startHook;
  34. private Action<EmptyEventArgs> startHandler;
  35. private EventHook updateHook;
  36. private Action<EmptyEventArgs> updateHandler;
  37.  
  38. public MyFlowGraphScript(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. CustomEvent.Trigger(GameObject.Find("Hello World"), "1" + "5", Empty<object>.array);
  52. }
  53.  
  54. public void Update() { }
  55.  
  56. public override void StartListening()
  57. {
  58. base.StartListening();
  59. startHook = new EventHook("Start", machineScript);
  60. startHandler = args => Start();
  61. EventBus.Register(startHook, startHandler);
  62. updateHook = new EventHook("Update", machineScript);
  63. updateHandler = args => Update();
  64. EventBus.Register(updateHook, updateHandler);
  65. }
  66.  
  67. public override void StopListening()
  68. {
  69. base.StopListening();
  70. EventBus.Unregister(startHook, startHandler);
  71. startHandler = null;
  72. EventBus.Unregister(updateHook, updateHandler);
  73. updateHandler = null;
  74. }
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement