dragonruby-zif
dragonruby-zif copied to clipboard
Full paths should be allowed for all animations just like they are for sprites
This works:
self.player_sprite = Zif::Sprite.new.tap do |s|
s.x = player.x
s.y = player.y
s.w = player.size
s.h = player.size
s.path = 'sprites/spritesheet.png'
s.source_h = 8
s.source_w = 8
s.source_x = 0 * 8
s.source_y = 0 * 8
end
this does not:
player_sprite.new_tiled_animation(
named: :walk,
width: 8,
height:8,
path: 'sprites/spritesheet.png',
durations: durations,
)
Recommend going with the principle of least surprise. Some devs will not use the normal DR conventions. Also recommend if a path is not found throwing an exception stating the problem, but I'm not sure if that's common with DragonRuby itself.