换新miya立绘
给不同立绘添加不同点击动画
11
main.lua
@@ -256,13 +256,14 @@ IMG.init{
|
||||
pay1='media/image/mess/pay1.png',
|
||||
pay2='media/image/mess/pay2.png',
|
||||
|
||||
miyaCH='media/image/characters/miya.png',
|
||||
miyaF1='media/image/characters/miya_f1.png',
|
||||
miyaF2='media/image/characters/miya_f2.png',
|
||||
miyaF3='media/image/characters/miya_f3.png',
|
||||
miyaF4='media/image/characters/miya_f4.png',
|
||||
miyaCH1='media/image/characters/miya1.png',
|
||||
miyaCH2='media/image/characters/miya2.png',
|
||||
miyaCH3='media/image/characters/miya3.png',
|
||||
miyaHeart='media/image/characters/miya_heart.png',
|
||||
miyaGlow='media/image/characters/miya_glow.png',
|
||||
monoCH='media/image/characters/mono.png',
|
||||
xiaoyaCH='media/image/characters/xiaoya.png',
|
||||
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
|
||||
mikuCH='media/image/characters/miku.png',
|
||||
electric='media/image/characters/electric.png',
|
||||
hbm='media/image/characters/hbm.png',
|
||||
|
||||
|
Before Width: | Height: | Size: 74 KiB |
BIN
media/image/characters/miya1.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
media/image/characters/miya2.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
media/image/characters/miya3.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
media/image/characters/miya_glow.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
media/image/characters/miya_heart.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
BIN
media/image/characters/xiaoya_Omino.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
@@ -4,13 +4,12 @@ local sin=math.sin
|
||||
|
||||
local scene={}
|
||||
|
||||
local last--Last touch time
|
||||
local jump--Animation timer(10 to 0)
|
||||
local last1,last2--Last touch/sound time
|
||||
local sfxPack=SETTING.sfxPack
|
||||
local vocPack=SETTING.vocPack
|
||||
|
||||
function scene.sceneInit()
|
||||
last,jump=0,0
|
||||
last1,last2=0,0
|
||||
sfxPack=SETTING.sfxPack
|
||||
vocPack=SETTING.vocPack
|
||||
WIDGET.active.sfxPack:reset()
|
||||
@@ -22,16 +21,15 @@ function scene.sceneBack()
|
||||
end
|
||||
|
||||
function scene.mouseDown(x,y)
|
||||
if x>780 and x<980 and y>470 and y<720 and jump==0 then
|
||||
jump=10
|
||||
local t=TIME()-last
|
||||
if t>1 then
|
||||
if t>2.6 and t<3 and not GAME.playing then
|
||||
loadGame('sprintSmooth',true)
|
||||
else
|
||||
VOC.play((t<1.26 or t>6.26)and'doubt'or'happy')
|
||||
last=TIME()
|
||||
end
|
||||
local t1=TIME()-last1
|
||||
if x>780 and x<980 and y>470 and y<720 and t1>.2 then
|
||||
last1=TIME()
|
||||
local t2=TIME()-last2
|
||||
if t2>2.6 and t2<3 and not GAME.playing then
|
||||
loadGame('sprintSmooth',true)
|
||||
else
|
||||
VOC.play((t2<1.26 or t2>6.26)and'doubt'or'happy')
|
||||
last2=TIME()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -45,32 +43,35 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if jump>0 then
|
||||
jump=jump-1
|
||||
end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
local t=TIME()
|
||||
local x,y=800,340+10*sin(t*.5)+(jump-10)*jump*.3
|
||||
gc.translate(x,y)
|
||||
gc.push('transform')
|
||||
if vocPack=="miya"then
|
||||
gc.draw(IMG.miyaCH)
|
||||
gc.setColor(1,1,1,.7)
|
||||
gc.draw(IMG.miyaF1,4,47+4*sin(t*.9))
|
||||
gc.draw(IMG.miyaF2,42,107+5*sin(t))
|
||||
gc.draw(IMG.miyaF3,93,126+3*sin(t*.7))
|
||||
gc.draw(IMG.miyaF4,129,98+3*sin(t*.5))
|
||||
gc.translate(780,340+6*sin(TIME()*.5))
|
||||
gc.draw(IMG.miyaGlow,-4,-4)
|
||||
if TIME()-last1<1 then
|
||||
gc.draw(IMG.miyaCH3)
|
||||
elseif TIME()%2<.126 then
|
||||
gc.draw(IMG.miyaCH1)
|
||||
else
|
||||
gc.draw(IMG.miyaCH2)
|
||||
end
|
||||
gc.translate(0,-6*sin(TIME()*.5))
|
||||
gc.setColor(1,1,1,1-(TIME()-last1))
|
||||
gc.draw(IMG.miyaHeart,162,52,nil,.3)
|
||||
elseif vocPack=="mono"then
|
||||
local jump=math.max(30-(TIME()-last1)*60,0)%10
|
||||
gc.translate(800,340+6*sin(TIME()*.5)+(jump-10)*jump*.3)
|
||||
gc.draw(IMG.monoCH,-30)
|
||||
elseif vocPack=="xiaoya"then
|
||||
gc.draw(IMG.xiaoyaCH,-30)
|
||||
gc.translate(770,340+4*sin(TIME()*.5))
|
||||
gc.draw(IMG.xiaoyaCH)
|
||||
gc.draw(IMG.xiaoyaOmino,16,168,26/(1+TIME()-last1),.36,.36,33,37)
|
||||
elseif vocPack=="miku"then
|
||||
gc.translate(800,340+12*sin(TIME()*.5))
|
||||
gc.draw(IMG.mikuCH,-30)
|
||||
end
|
||||
gc.translate(-x,-y)
|
||||
gc.pop()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
|
||||