Skip to content

Game crashes when animation does not properly animation interval #8

Description

@burtlo

When I mistakenly defined an animation with a duration and not an interval the game crashes. A warning should be specified if an interval is not found and it should default to 1.tick

animate :speech_bubble, to: { alpha: 255 }, duration: 16.ticks
/Users/burtlo/.rvm/gems/ruby-1.9.3-p392@gaming/gems/chipmunk-5.3.4.5/lib/chipmunk.rb:6: Use RbConfig instead of obsolete and deprecated Config.
WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.7.8
/Volumes/Amazon/metro/metro/lib/metro/animation/on_update_operation.rb:76:in `>=': comparison of Fixnum with nil failed (ArgumentError)
    from /Volumes/Amazon/metro/metro/lib/metro/animation/on_update_operation.rb:76:in `update_completed?'
    from /Volumes/Amazon/metro/metro/lib/metro/animation/on_update_operation.rb:42:in `update'
    from /Volumes/Amazon/metro/metro/lib/metro/scene.rb:376:in `block in base_update'
    from /Volumes/Amazon/metro/metro/lib/metro/scene.rb:376:in `each'
    from /Volumes/Amazon/metro/metro/lib/metro/scene.rb:376:in `base_update'
    from /Volumes/Amazon/metro/metro/lib/metro/window.rb:41:in `update'
    from /Volumes/Amazon/metro/metro/lib/metro/game.rb:18:in `start!'
    from /Volumes/Amazon/metro/metro/lib/metro.rb:108:in `start_game'
    from /Volumes/Amazon/metro/metro/lib/metro.rb:100:in `run'
    from ../metro/bin/metro:15:in `<main>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions