Plane: when rising above the sky level, motor power is reset

This commit is contained in:
Erkki Seppälä 2014-10-19 02:25:27 +03:00
parent 75182d1d91
commit 2e7cce29ea

View file

@ -120,6 +120,11 @@ Plane = Class{
PhysicsEntity.update(self, dt)
self.machinegun:update(dt)
if self.body:getY() < 0 then
self.motorPower = 0
end
if self.powerupmode ~= nil then
self.powerupmode:update(dt)
end