Implementing starfall version of engine
This commit is contained in:
18
koptilnya/engine/differential.txt
Normal file
18
koptilnya/engine/differential.txt
Normal 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
|
||||
Reference in New Issue
Block a user