Implementing starfall version of engine
This commit is contained in:
4
koptilnya/engine/gearboxes/auto.txt
Normal file
4
koptilnya/engine/gearboxes/auto.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
-- @include ./base.txt
|
||||
require("./base.txt")
|
||||
|
||||
AutomaticGearbox = class("AutomaticGearbox")
|
||||
28
koptilnya/engine/gearboxes/base.txt
Normal file
28
koptilnya/engine/gearboxes/base.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
4
koptilnya/engine/gearboxes/cvt.txt
Normal file
4
koptilnya/engine/gearboxes/cvt.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
-- @include ./base.txt
|
||||
require("./base.txt")
|
||||
|
||||
CVT = class("CVT")
|
||||
10
koptilnya/engine/gearboxes/manual.txt
Normal file
10
koptilnya/engine/gearboxes/manual.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
-- @include ./base.txt
|
||||
require("./base.txt")
|
||||
|
||||
ManualGearbox = class("ManualGearbox")
|
||||
|
||||
function ManualGearbox:initialize(options)
|
||||
-- create base gearbox inside
|
||||
end
|
||||
|
||||
-- proxy the methods here
|
||||
Reference in New Issue
Block a user