2023-03-27 02:09:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# class to represent scenes
|
|
|
|
class SceneInstance
|
|
|
|
def initialize(_args, opts = {})
|
|
|
|
@tick_in_background = opts.tick_in_background._? false
|
2023-04-11 06:26:39 +00:00
|
|
|
@reset_on_pop = opts.reset_on_pop._? false
|
2023-03-27 02:09:28 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
attr_reader :tick_in_background
|
2023-04-11 06:26:39 +00:00
|
|
|
attr_accessor :reset_on_pop
|
2023-03-27 02:09:28 +00:00
|
|
|
|
|
|
|
# called every tick of the game loop
|
|
|
|
def tick(args) end
|
|
|
|
|
|
|
|
# custom logic to reset this scene
|
|
|
|
def reset(args) end
|
|
|
|
end
|