class IMICRTS class Window < CyberarmEngine::Engine attr_reader :mouse def setup @last_update_time = Gosu.milliseconds @mouse = CyberarmEngine::Vector.new @cursor = Gosu::Image.new("#{IMICRTS::ASSETS_PATH}/cursors/pointer.png") self.caption = "#{IMICRTS::NAME} (#{IMICRTS::VERSION} #{IMICRTS::VERSION_NAME})" if ARGV.join.include?("--debug-game") push_state(Game) elsif Setting.enabled?(:skip_intro) push_state(MainMenu) else push_state(Boot) end end def draw @cursor.draw(mouse_x, mouse_y, Float::INFINITY) super end def update @mouse.x, @mouse.y = self.mouse_x, self.mouse_y super @last_update_time = Gosu.milliseconds end def needs_cursor? return false end def close push_state(Closing) unless current_state.is_a?(Closing) end def delta_time Gosu.milliseconds - @last_update_time end def dt delta_time / 1000.0 end end end