diff --git a/Bullet.gd b/Bullet.gd index 8991070..3e1be9c 100644 --- a/Bullet.gd +++ b/Bullet.gd @@ -13,7 +13,7 @@ func fire(delta, vel, dir, speed): sprite.rotate(dir.angle()) func type(): - return "Enemy" + return "Bullet" func _fixed_process(delta): diff --git a/Drawer.gd b/Drawer.gd index 96af121..06e7f8e 100644 --- a/Drawer.gd +++ b/Drawer.gd @@ -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 diff --git a/Minimap.gd b/Minimap.gd index 9a9e402..7a2a401 100644 --- a/Minimap.gd +++ b/Minimap.gd @@ -22,9 +22,15 @@ 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() diff --git a/raw/minimap.ase b/raw/minimap.ase index f7c4026..ca24876 100644 --- a/raw/minimap.ase +++ b/raw/minimap.ase @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4ee2a229e536843a7614db4df999ffb22a4dd382176d4dd24a333870dcd8304 -size 1047 +oid sha256:a093996494d981df991982202a4fd54d6c47d91caddf56f7debdc1b831a65e32 +size 1046 diff --git a/raw/minimap.png b/raw/minimap.png index 14c44aa..9d5e6f4 100644 Binary files a/raw/minimap.png and b/raw/minimap.png differ