First attempt at character orientation

This commit is contained in:
2020-06-13 23:10:21 +01:00
parent 5df050b4ef
commit c5e6abb798
6 changed files with 45 additions and 22 deletions

View File

@@ -103,8 +103,8 @@ func (m *Map) SpritesForCell(x, y, z int) ([]*Sprite, error) {
sprites = append(sprites, sprite)
}
if chr := m.CharacterAt(x, y, z); chr != nil {
// Look up the correct animation, get the frame, boom
anim, err := m.assets.CharacterAnimation(chr.Type, data.AnimActionNone)
// Look up the correct animation, get the frame, boom shakalaka
anim, err := m.assets.CharacterAnimation(chr.Type, data.AnimActionNone, int(chr.Orientation))
if err != nil {
return nil, err
}