Delete slip behavior
This commit is contained in:
parent
93b63a5831
commit
fc1f84fa28
@ -530,8 +530,6 @@ ship_m = mknew{
|
|||||||
shieldpenalty = 0x0.012c, --5s
|
shieldpenalty = 0x0.012c, --5s
|
||||||
shield_refresh_ready = 0,
|
shield_refresh_ready = 0,
|
||||||
|
|
||||||
slip = true, -- most enemies slide
|
|
||||||
|
|
||||||
xmomentum = 0,
|
xmomentum = 0,
|
||||||
ymomentum = 0,
|
ymomentum = 0,
|
||||||
|
|
||||||
@ -622,14 +620,6 @@ function ship_m:move()
|
|||||||
self.x += self.xmomentum
|
self.x += self.xmomentum
|
||||||
self.y += self.ymomentum
|
self.y += self.ymomentum
|
||||||
|
|
||||||
-- "scrolling" behavior
|
|
||||||
if self.slip then
|
|
||||||
self.y += scrollrate
|
|
||||||
if self.y >= 128 then
|
|
||||||
self:die()
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1189,7 +1179,6 @@ player = mknew(ship_m.new{
|
|||||||
thrust = 0.1875, -- momentum added from button
|
thrust = 0.1875, -- momentum added from button
|
||||||
ymin = 0, ymax = 120, -- stay on screen
|
ymin = 0, ymax = 120, -- stay on screen
|
||||||
drag = 0.0625, -- momentum lost per frame
|
drag = 0.0625, -- momentum lost per frame
|
||||||
slip = false, -- does not slide down screen
|
|
||||||
act = function(self) -- fetch buttons
|
act = function(self) -- fetch buttons
|
||||||
local b,th = btn(),self.thrust
|
local b,th = btn(),self.thrust
|
||||||
local blr = b&0x3
|
local blr = b&0x3
|
||||||
@ -1345,7 +1334,6 @@ chasey = mknew(ship_m.new{
|
|||||||
maxspd = 2,
|
maxspd = 2,
|
||||||
thrust = 0.2,
|
thrust = 0.2,
|
||||||
drag = 0.075,
|
drag = 0.075,
|
||||||
slip = true,
|
|
||||||
|
|
||||||
init = function(ship)
|
init = function(ship)
|
||||||
ship.main_gun=ship.main_gun or zap_gun_e.new{}
|
ship.main_gun=ship.main_gun or zap_gun_e.new{}
|
||||||
@ -1373,7 +1361,6 @@ xl_chasey=mknew(chasey.new{
|
|||||||
hp = 19.5,
|
hp = 19.5,
|
||||||
shield = 5,
|
shield = 5,
|
||||||
boss = true,
|
boss = true,
|
||||||
slip = false,
|
|
||||||
act = function(self)
|
act = function(self)
|
||||||
local dx,dy,shoot_spec,shoot_main = chasey.act(self)
|
local dx,dy,shoot_spec,shoot_main = chasey.act(self)
|
||||||
if (self.y < 4) dy=self.thrust
|
if (self.y < 4) dy=self.thrust
|
||||||
@ -1401,7 +1388,6 @@ ship_f = mknew(ship_m.new{
|
|||||||
maxspd = 3,
|
maxspd = 3,
|
||||||
thrust = 0.1,
|
thrust = 0.1,
|
||||||
drag = 0.05,
|
drag = 0.05,
|
||||||
slip = false,
|
|
||||||
act = function(self)
|
act = function(self)
|
||||||
local wx,wy=self.want_x,self.want_y
|
local wx,wy=self.want_x,self.want_y
|
||||||
self.xmin,self.xmax,self.ymin,self.ymax = wx,wx,wy,wy
|
self.xmin,self.xmax,self.ymin,self.ymax = wx,wx,wy,wy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user