trig zap gun; fixes
use the trig gun for the zap gun
This commit is contained in:
parent
2fdb8d1a05
commit
b18b4f885d
@ -876,7 +876,7 @@ end
|
||||
|
||||
trig_gun = mknew(gun_base.new{
|
||||
veloc = 1,
|
||||
aim = 0.25, --use 0.75 for a player gun
|
||||
aim = 0.75, -- down; 0.25 is up
|
||||
shot_idx = 0,
|
||||
-- shots: list<list<[3]num>>
|
||||
-- describing a cycling
|
||||
@ -917,7 +917,7 @@ function trig_gun:actually_shoot(x, y)
|
||||
-- multiple collision checks
|
||||
m.dy = sin(a) * veloc
|
||||
m.dx = cos(a) * veloc
|
||||
m.spawn_at(x+(xo or 0), y)
|
||||
m:spawn_at(x+(xo or 0), y)
|
||||
end
|
||||
end
|
||||
|
||||
@ -940,8 +940,6 @@ zap_e = mknew(bullet_base.new{
|
||||
y_off = 8,
|
||||
|
||||
damage = 1,
|
||||
dx = 0, -- px/frame
|
||||
dy = 4,
|
||||
|
||||
hitship = const_fxn(true),
|
||||
|
||||
@ -950,19 +948,21 @@ zap_e = mknew(bullet_base.new{
|
||||
|
||||
zap_p = mknew(zap_e.new{
|
||||
sprite = 8,
|
||||
dy = -8,
|
||||
y_off = 0,
|
||||
category = player_blt_cat,
|
||||
})
|
||||
|
||||
zap_gun_e = mknew(gun_base.new{
|
||||
zap_gun_e = mknew(trig_gun.new{
|
||||
cooldown = 0x0.0020, -- frames between shots
|
||||
veloc = 4,
|
||||
munition = zap_e,
|
||||
})
|
||||
|
||||
zap_gun_p = mknew(zap_gun_e.new{
|
||||
icon = 19,
|
||||
munition = zap_p,
|
||||
veloc = 8,
|
||||
aim = 0.25,
|
||||
hdr = "mAIN gUN",
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user