28 lines
408 B
Plaintext
28 lines
408 B
Plaintext
Gearbox = class("Gearbox")
|
|
|
|
function Gearbox:initialize(options)
|
|
options = options or {}
|
|
|
|
self.ratios = options.ratios
|
|
self.finalDrive = options.finalDrive
|
|
|
|
self._linkedDiffs = {}
|
|
|
|
self.gear = 0
|
|
end
|
|
|
|
function Gearbox:linkDiff(diff)
|
|
table.insert(self._linkedDiffs, diff)
|
|
end
|
|
|
|
function Gearbox:shift(dir)
|
|
|
|
end
|
|
|
|
function Gearbox:setGear(gear)
|
|
self.gear = gear
|
|
end
|
|
|
|
function Gearbox:update()
|
|
|
|
end |