Ozzypig

GraphEdge

Feb 26th, 2018
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- GraphEdge class
  2. -- ModuleScript inside Graph ModuleScript
  3. -- by Ozzypig (Twitter: @Ozzypig, ozzypig.com)
  4.  
  5. local GraphEdge = {}
  6. GraphEdge.__index = GraphEdge
  7.  
  8. function GraphEdge.new(nodeOrigin, nodeTarget, value)
  9.     local self = setmetatable({
  10.         origin = nodeOrigin;
  11.         target = nodeTarget;
  12.         value = value or 1;
  13.     }, GraphEdge)
  14.    
  15.     return self
  16. end
  17.  
  18. return GraphEdge
RAW Paste Data