Plane: when rising above the sky level, motor power is reset
This commit is contained in:
parent
75182d1d91
commit
2e7cce29ea
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue