make sim use proper OOP

This commit is contained in:
Redo0
2021-05-25 14:18:13 -05:00
parent 0963ef8ca8
commit be2df1ef33
8 changed files with 74 additions and 56 deletions

View File

@@ -21,7 +21,7 @@ function Wire.setlayer(self, layer)
Group.removewire(self.group, self)
end
self.layer = layer
Simulation.connectwire(self.sim, self)
Simulation.connectwire(Wire.getsim(self), self)
end
function Wire.update(self)
@@ -47,3 +47,7 @@ end
function Wire.getbounds(self)
return self.bounds
end
function Wire.getsim(wire)
return wire.sim
end