amethyst / amethyst/rustrogueliketutorial

1.9 suggestion - mention draw_map before ranged_target

未关闭
#119 0 条评论 0 个 reaction 已指派 1 人 已被 @thebracket 认领 在 GitHub 查看
主要语言
Rust
星标
970
派生
166
PR 合并指标
30 天内没有已合并 PR

描述

Before 1.9, the last mention of `draw_map()` and the code below occurs in 1.6 where it is below the `delete_the_dead()` call.

```
damage_system::delete_the_dead(&mut self.ecs);

draw_map(&self.ecs, ctx);

let positions = self.ecs.read_storage::();
let renderables = self.ecs.read_storage::();
let map = self.ecs.fetch::();

for (pos, render) in (&positions, &renderables).join() {
let idx = map.xy_idx(pos.x, pos.y);
if map.visible_tiles[idx] { ctx.set(pos.x, pos.y, render.fg, render.bg, render.glyph) }
}
```

The setting of backgrounds in `ranged_target()` gets overwritten by the map drawing/rendering code, and it's not explicitly mentioned in the tutorial that it needs to be moved up to the beginning of `tick()`.. might be helpful add that.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。