amethyst / amethyst/rustrogueliketutorial

1.9 suggestion - mention draw_map before ranged_target

オープン
#119 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。