添加少许魔法

框架跟进
This commit is contained in:
MrZ_26
2022-04-04 05:25:42 +08:00
parent 984bb7d6a6
commit 2207f7e414
10 changed files with 34 additions and 8 deletions

View File

@@ -285,6 +285,15 @@ IMG.init{
xiaoyaCH='media/image/characters/xiaoya.png',
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
mikuCH='media/image/characters/miku.png',
z={
character='media/image/characters/z_character.png',
screen1='media/image/characters/z_screen1.png',
screen2='media/image/characters/z_screen2.png',
particle1='media/image/characters/z_particle1.png',
particle2='media/image/characters/z_particle2.png',
particle3='media/image/characters/z_particle3.png',
particle4='media/image/characters/z_particle4.png',
},
electric='media/image/characters/electric.png',
hbm='media/image/characters/hbm.png',

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -75,6 +75,21 @@ function scene.keyDown(key,isRep)
end
function scene.draw()
--Character
gc.push('transform')
local t=love.timer.getTime()
gc.setColor(1,1,1)
gc.translate(906,456)
gc.scale(.6)
GC.draw(IMG.z.character)
GC.draw(IMG.z.screen1, -91, -157+16*math.sin(t))
GC.draw(IMG.z.screen2, 120, -166+16*math.sin(t+1))
gc.setColor(1,1,1,.7+.3*math.sin(.6*t)) GC.draw(IMG.z.particle1, -50, 42+6*math.sin(t*0.36))
gc.setColor(1,1,1,.7+.3*math.sin(.7*t)) GC.draw(IMG.z.particle2, 110+6*math.sin(t*0.92), 55)
gc.setColor(1,1,1,.7+.3*math.sin(.8*t)) GC.draw(IMG.z.particle3, -54+6*math.sin(t*0.48), -248)
gc.setColor(1,1,1,.7+.3*math.sin(.9*t)) GC.draw(IMG.z.particle4, 133, -305+6*math.sin(t*0.40))
gc.pop()
gc_setColor(COLOR.Z)
--Scroller
@@ -89,23 +104,25 @@ function scene.draw()
if selected>2 then gc_print(bgmList[selected-2],322,350-50)end
if selected<#bgmList-1 then gc_print(bgmList[selected+2],322,350+110)end
--Title
if BGM.nowPlay then
GC.draw(TEXTURE.title,562,180,nil,.42)
local a=-t%2.3/2.3
gc_setColor(1,1,1,math.min(a,1))
GC.draw(TEXTURE.title_color,562,180,nil,.42+.062-.062*a)
end
--Music player
gc.draw(TEXTURE.title,840,220,nil,.5,nil,580,118)
if BGM.nowPlay then
local t=TIME()
setFont(45)
GC.shadedPrint(BGM.nowPlay,710,508,'left',2)
gc_setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
gc_print(BGM.nowPlay,710,508)
setFont(35)
gc_setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5)
gc_print(author[BGM.nowPlay]or"MrZ",670,465)
local a=-t%2.3/2
if a<1 then
gc_setColor(1,1,1,a)
gc.draw(TEXTURE.title_color,840,220,nil,.5+.062-.062*a,.5+.126-.126*a,580,118)
end
setFont(20)
gc_setColor(COLOR.Z)
local cur=BGM.playing:tell()