+ new particle ssytem & + green dot 1 and 2, blue ring, large rainbow ring and red ball particles back

This commit is contained in:
FajsiEx 2021-11-17 18:56:51 +01:00
parent a13fed652a
commit ce407e6adf
3 changed files with 162 additions and 103 deletions

View File

@ -10,14 +10,14 @@ local enterFlarePinkImage = gfx.CreateSkinImage("gameplay/track_end/flares/pink_
local trackCompImage = gfx.CreateSkinImage("gameplay/track_end/track_comp.png", 0)
local trackCompBlurImage = gfx.CreateSkinImage("gameplay/track_end/track_comp_blur.png", 0)
local particleRedBall = gfx.CreateSkinImage("gameplay/track_end/particles/red_ball.png", 0)
local particleRedRing = gfx.CreateSkinImage("gameplay/track_end/particles/red_ring.png", 0)
local particleYellowRing = gfx.CreateSkinImage("gameplay/track_end/particles/yellow_ring.png", 0)
-- new
local particleGreenDot1Image = gfx.CreateSkinImage("gameplay/track_end/particles/green_dot_1.png", 0)
local particleGreenDot2Image = gfx.CreateSkinImage("gameplay/track_end/particles/green_dot_2.png", 0)
local particleSmallRainbowRing = gfx.CreateSkinImage("gameplay/track_end/particles/small_rainbow_ring.png", 0)
local particleSmYellowRingA = gfx.CreateSkinImage("gameplay/track_end/particles/small_yellow_ring_1.png", 0)
local particleSmYellowRingB = gfx.CreateSkinImage("gameplay/track_end/particles/small_yellow_ring_2.png", 0)
local particleSmYellowRingC = gfx.CreateSkinImage("gameplay/track_end/particles/small_yellow_ring_4.png", 0)
local particleBlueRingImage = gfx.CreateSkinImage("gameplay/track_end/particles/blue_ring.png", 0)
local particleLargeRainbowRingImage = gfx.CreateSkinImage("gameplay/track_end/particles/large_rainbow_ring.png", 0)
local particleRedBallImage = gfx.CreateSkinImage("gameplay/track_end/particles/red_ball.png", 0)
local outroTransitionScale = 0;
@ -28,12 +28,64 @@ local outroTransitionTextCutX = 0;
local outroTransitionTextAlpha = 1;
local outroTransitionTextBlurAlpha = 0;
local outroTransitionParticleRedX = -500;
local particles = {
green_dot_one = {
texture = particleGreenDot1Image,
startX = 1280,
finishX = 380,
currentX = 1280,
yPos = 660,
width = 235*0.5,
height = 235*0.5,
startTime = 0.25,
duration = 0.6
},
green_dot_two = {
texture = particleGreenDot2Image,
startX = 1280,
finishX = 70,
currentX = 1280,
yPos = 610,
width = 128*0.5,
height = 128*0.5,
startTime = 0.25,
duration = 0.6
},
blue_ring = {
texture = particleBlueRingImage,
startX = 1280,
finishX = 65,
currentX = 1280,
yPos = 620,
width = 229*0.5,
height = 229*0.5,
startTime = 0.25,
duration = 0.6
},
large_rainbow_ring = { -- needs opacity and scale transitions
texture = particleLargeRainbowRingImage,
startX = (1080/2-(2160*0.675)/2),
finishX = (1080/2-(2160*0.675)/2),
currentX = (1080/2-(2160*0.675)/2),
yPos = (680-(2273*0.675)/2) + 100,
width = 2160*0.675,
height = 2273*0.675,
startTime = 0.25,
duration = 0.6
},
red_ball = { -- needs opacity transition
texture = particleRedBallImage,
startX = -150,
finishX = -150,
currentX = -150,
yPos = 500,
width = 787*0.5,
height = 818*0.5,
startTime = 0.25,
duration = 0.6
},
}
local outroTransitionParticleSmallRainbowX = 1080;
local outroTransitionParticleSmallYellowRingAX = 1080;
local outroTransitionParticleSmallYellowRingBX = 1080;
local outroTransitionParticleSmallYellowRingCX = 1080;
if (game.GetSkinSetting('audio_systemVoice')) then
game.LoadSkinSample('gameplay/track_comp_rasis.wav');
@ -66,27 +118,20 @@ local tickTransitions = function (deltaTime)
(outroTransitionScale-0.25)/0.2) -- Last from 0.25 transition scale for 0.2 transition scale, ending at 0.45 TS
)
outroTransitionParticleRedX = math.min(1080+150, (
particleTransitionScale*
(1080+150)
)-500);
for particleName, particle in pairs(particles) do
if (outroTransitionScale < particle.startTime) then
particle.currentX = particle.startX;
elseif (outroTransitionScale >= particle.startTime + particle.duration) then
particle.currentX = particle.finishX;
else
local transScale = Easing.outQuad(math.min(1, (outroTransitionScale-particle.startTime)/particle.duration));
local xDiff = particle.finishX - particle.startX;
particle.currentX = particle.startX + xDiff*transScale;
end
end
outroTransitionParticleSmallRainbowX = math.max(-1080-250, (
particleTransitionScale*
(-1080-250)
)+1080);
outroTransitionParticleSmallYellowRingAX = math.max(-1080+0, (
particleTransitionScale*
(-1080+0)
)+1080);
outroTransitionParticleSmallYellowRingBX = math.max(-1080+250, (
particleTransitionScale*
(-1080+250)
)+1080);
outroTransitionParticleSmallYellowRingCX = math.max(-1080+200, (
particleTransitionScale*
(-1080+200)
)+1080);
-- if (outroTransitionScale > 0.45 and outroTransitionScale < 0.5) then
-- if (outroTransitionScale <= 0.475) then
@ -100,78 +145,92 @@ local tickTransitions = function (deltaTime)
end
local drawParticles = function ()
for particleName, particle in pairs(particles) do
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleRedX-80,
510-80,
787*0.7,
818*0.7,
particleYellowRing,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleRedX,
510,
787*0.5,
818*0.5,
particleRedBall,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleRedX,
510,
787*0.5,
818*0.5,
particleRedRing,
particle.currentX,
particle.yPos,
particle.width,
particle.height,
particle.texture,
1,
0
);
-- game.Log(particle.currentX, game.LOGGER_ERROR)
end
-- Right side
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleSmallRainbowX,
465,
1117*0.5,
1117*0.5,
particleSmallRainbowRing,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleSmallYellowRingAX,
575,
579*0.5,
557*0.5,
particleSmYellowRingA,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleSmallYellowRingBX,
585,
436*0.5,
392*0.5,
particleSmYellowRingB,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
outroTransitionParticleSmallYellowRingCX,
625,
275*0.5,
275*0.5,
particleSmYellowRingC,
1,
0
);
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleRedX-80,
-- 510-80,
-- 787*0.7,
-- 818*0.7,
-- particleYellowRing,
-- 1,
-- 0
-- );
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleRedX,
-- 510,
-- 787*0.5,
-- 818*0.5,
-- particleRedBall,
-- 1,
-- 0
-- );
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleRedX,
-- 510,
-- 787*0.5,
-- 818*0.5,
-- particleRedRing,
-- 1,
-- 0
-- );
-- -- Right side
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleSmallRainbowX,
-- 465,
-- 1117*0.5,
-- 1117*0.5,
-- particleSmallRainbowRing,
-- 1,
-- 0
-- );
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleSmallYellowRingAX,
-- 575,
-- 579*0.5,
-- 557*0.5,
-- particleSmYellowRingA,
-- 1,
-- 0
-- );
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleSmallYellowRingBX,
-- 585,
-- 436*0.5,
-- 392*0.5,
-- particleSmYellowRingB,
-- 1,
-- 0
-- );
-- gfx.BeginPath();
-- gfx.ImageRect(
-- outroTransitionParticleSmallYellowRingCX,
-- 625,
-- 275*0.5,
-- 275*0.5,
-- particleSmYellowRingC,
-- 1,
-- 0
-- );
end
local handleSounds = function ()

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB