Implementing starfall version of engine

This commit is contained in:
Ivan Grachyov
2021-11-09 21:09:03 +05:00
parent a5f7bedf8d
commit e2c1c4bc88
12 changed files with 200 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
Differential = class("Differential")
function Differential:initialize(options)
options = options or {}
self.power = options.Power or 1
self.coast = options.Coast or 1
self.preload = options.Preload or 10
self.viscousCoeff = options.ViscousCoeff or 0.9
self._gearbox = options.Gearbox
self._leftWheel = options.LeftWheel
self._rightWheel = options.RightWheel
if self._gearbox then
self._gearbox:linkDiff(self)
end
end