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,4 @@
-- @include ./base.txt
require("./base.txt")
AutomaticGearbox = class("AutomaticGearbox")

View 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

View File

@@ -0,0 +1,4 @@
-- @include ./base.txt
require("./base.txt")
CVT = class("CVT")

View 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