SNKRX/media.lua

36 lines
785 B
Lua
Raw Normal View History

2021-04-24 05:19:22 +02:00
Media = Object:extend()
Media:implement(State)
function Media:init(name)
self:init_state(name)
end
function Media:on_enter(from)
camera.x, camera.y = gw/2, gh/2
self.main = Group()
self.effects = Group()
self.ui = Group()
2021-06-11 12:43:15 +02:00
graphics.set_background_color(yellow2[0])
2021-06-05 08:11:23 +02:00
Text2{group = self.ui, x = gw/2, y = gh/2, lines = {
{text = '[fg]SNKRX', font = fat_font, alignment = 'center', height_offset = -15},
2021-06-11 12:43:15 +02:00
{text = '[fg]mercenary update', font = pixul_font, alignment = 'center'},
2021-06-05 08:11:23 +02:00
}}
2021-04-24 05:19:22 +02:00
end
function Media:update(dt)
self.main:update(dt*slow_amount)
self.effects:update(dt*slow_amount)
self.ui:update(dt*slow_amount)
end
function Media:draw()
self.main:draw()
self.effects:draw()
self.ui:draw()
2021-06-08 06:21:35 +02:00
2021-06-11 12:43:15 +02:00
mercenary:draw(30, 30, 0, 1, 1, 0, 0, yellow2[-5])
2021-04-24 05:19:22 +02:00
end