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,20 @@
Engine = class("Engine")
function Engine:initialize(options)
options = options or {}
self.idleRPM = options.IdleRPM or 800
self.maxRPM = options.MaxRPM or 8000
self.flywheelMass = options.FlywheelMass or 4
self.flywheelRadius = options.FlywheelRadius or 0.3
self.startFriction = options.StartFriction or -30
self.frictionCoeff = options.FrictionCoeff or 0.02
self.limiterDuration = options.LimiterDuration or 0.05
self.torqueMap = options.TorqueMap or {}
self.throttle = 0
end