local DonBG = require("Skins/PyTaikoGreen/Scripts/bg_objects/donbg") local ChibiController = require("Skins/PyTaikoGreen/Scripts/bg_objects/chibi") Background = {} Background.__index = Background function Background.new(player_num, bpm, scene_preset) local self = setmetatable({}, Background) self.player_num = player_num self.bpm = bpm self.scene_preset = scene_preset tex.load_animations("background") tex.load_folder("background", "bg_normal/bg_0") self.donbg = DonBG.create(player_num, "background") self.chibi = ChibiController.new(bpm, "background") return self end function Background:update(current_ms, bpm) self.bpm = bpm self.donbg:update(current_ms) self.chibi:update(current_ms, bpm) end function Background:handle_good(player_num) self.chibi:add_chibi(player_num, false) end function Background:handle_ok(player_num) self.chibi:add_chibi(player_num, false) end function Background:handle_bad(player_num) self.chibi:add_chibi(player_num, true) end function Background:handle_drumroll(player_num) end function Background:handle_balloon(player_num) end function Background:handle_gauge(player_num, progress, is_clear, is_rainbow) self.donbg:set_clear(is_clear) end function Background:draw_back() self.donbg:draw() self.chibi:draw() tex.draw_texture("bg_0", "background") end function Background:draw_fore() end function Background:destroy() end