Sha256: 0e1aa0fd7a1c9f743a8f9752bf28c54554b8d17ab21c81bd701b9f42598a4993

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

# SPDX-License-Identifier: MIT
require "red_bird"
require "red_bird/demo/version"

module RedBird
  module Demo
    require_relative "demo/stage_main"
    require_relative "demo/stage_move_on_tiles"
    require_relative "demo/stage_resolution"
    require_relative "demo/version"

    class Error < StandardError; end

    def self.run
      RedBird::Engine.debug = true
      RedBird::Engine.set_pixel_quantity(256, 240)
      RedBird::Engine.set_screen_resolution(256, 240)

      gb = {
        stage: :main,
        palette: nil
      }
      RedBird::Engine.run(gb) do |global_data|
        case global_data[:stage]
        when :main then
          Demo::Stage::Main.new(global_data)
        when :move_on_tiles then
          Demo::Stage::MoveOnTiles.new(global_data)
        when :resolution then
          Demo::Stage::Resolution.new(global_data)
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
red_bird-demo-0.1.0 lib/red_bird/demo.rb