Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full paths should be allowed for all animations just like they are for sprites #40

Open
fregas opened this issue Oct 11, 2023 · 0 comments

Comments

@fregas
Copy link

fregas commented Oct 11, 2023

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.

@fregas fregas changed the title Full paths should be allowed for all animations Full paths should be allowed for all animations just like they are for sprites Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant