mirror of https://github.com/profan/ld-39-jam.git
hmm
This commit is contained in:
parent
3524712b6f
commit
b76bcd53e2
|
@ -13,7 +13,7 @@ func fire(delta, vel, dir, speed):
|
|||
sprite.rotate(dir.angle())
|
||||
|
||||
func type():
|
||||
return "Enemy"
|
||||
return "Bullet"
|
||||
|
||||
func _fixed_process(delta):
|
||||
|
||||
|
|
|
@ -19,8 +19,12 @@ func _draw():
|
|||
var p_mw = ((vp_rect.size.x / 2) - 1) + 32
|
||||
var p_mh = ((vp_rect.size.y / 2) - 1) + 32
|
||||
draw_rect(Rect2(p_mw, p_mh, 2, 2), Color(0, 1, 0))
|
||||
|
||||
for e in entities:
|
||||
var ent = e.get_ref()
|
||||
if ent == null:
|
||||
continue
|
||||
|
||||
var ent_pos = ent.get_global_pos()
|
||||
var s_mw = vp_rect.size.x / 2
|
||||
var s_mh = vp_rect.size.y / 2
|
||||
|
|
|
@ -22,8 +22,14 @@ func collect_entities():
|
|||
for i in range(0, entities.size()):
|
||||
if not entities[i].get_ref():
|
||||
if to_remove == null:
|
||||
print ("create")
|
||||
to_remove = Array()
|
||||
to_remove.push_back(i)
|
||||
to_remove.push_back(entities[i])
|
||||
# pass down updated
|
||||
if to_remove != null:
|
||||
for e in to_remove:
|
||||
entities.erase(e)
|
||||
render_target.init(entities)
|
||||
|
||||
func _fixed_process(delta):
|
||||
collect_entities()
|
||||
|
|
BIN
raw/minimap.ase (Stored with Git LFS)
BIN
raw/minimap.ase (Stored with Git LFS)
Binary file not shown.
BIN
raw/minimap.png
BIN
raw/minimap.png
Binary file not shown.
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 832 B |
Loading…
Reference in New Issue