script lua intro 56knews streams
parent
bf759f9846
commit
b871086a8a
@ -0,0 +1,3 @@
|
||||
# intro-56kNews_stream
|
||||
|
||||
Introducción para el programa. Modulo musical que hace que se mueva el logotipo. Escrito en lua (love 2d).
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,47 @@
|
||||
love.mouse.setVisible(false)
|
||||
love.window.setFullscreen(true)
|
||||
logo = {}
|
||||
logo.img = love.graphics.newImage("logo.png")
|
||||
logo.width = 300
|
||||
logo.height = 300
|
||||
logo.scale = 1
|
||||
ScreenSizeW = love.graphics.getWidth()
|
||||
ScreenSizeH = love.graphics.getHeight()
|
||||
font = love.graphics.newFont("fonts/amiga4ever.ttf", 12)
|
||||
songData = love.sound.newSoundData("mods/chiptune_no_150.mod")
|
||||
song = love.audio.newSource(songData)
|
||||
--love.timer.sleep( 1 )
|
||||
song:play()
|
||||
|
||||
|
||||
function love.load()
|
||||
songPos = song:tell("samples")
|
||||
songRate = songData:getSampleRate()
|
||||
songSize = songData:getSampleCount()
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
songPos = song:tell("samples")
|
||||
songSam = songData:getSample(songPos)
|
||||
love.draw()
|
||||
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
love.graphics.setColor(88,0,100)
|
||||
love.graphics.circle("line", ScreenSizeW/2, ScreenSizeH/2, songSam * ScreenSizeW )
|
||||
love.graphics.setColor(100,100,100)
|
||||
love.graphics.circle("line", ScreenSizeW/2, ScreenSizeH/2, songSam * ScreenSizeW )
|
||||
love.graphics.setColor(200,200,200)
|
||||
love.graphics.circle("line", ScreenSizeW/2, ScreenSizeH/2, songSam * (ScreenSizeW/2) )
|
||||
love.graphics.setColor(49,2,49)
|
||||
love.graphics.circle("line", ScreenSizeW/2, ScreenSizeH/2, songSam * (ScreenSizeW/4) )
|
||||
love.graphics.draw(logo.img, (ScreenSizeW/2)-(logo.width/2), (ScreenSizeH/2)-(logo.height/2), songSam, logo.scale, logo.scale)
|
||||
love.graphics.setColor(255,255,255)
|
||||
end
|
||||
|
||||
function love.keyreleased(key)
|
||||
if key == "escape" then
|
||||
love.event.quit()
|
||||
end
|
||||
end
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue