continuinggg (very cool improvements)
asynced video loadings, classes rewrites, bugfixes and a lot more
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import funkin.system.FunkinSprite;
|
||||
|
||||
var tankman:FunkinSprite;
|
||||
var tankTalk1, distorto:FlxSound;
|
||||
var tankTalk, distorto:FlxSound;
|
||||
var timers:Array<FlxTimer> = [];
|
||||
var destroyDistorto:Bool = true;
|
||||
|
||||
function create() {
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1}, 0.7, {ease: FlxEase.quadInOut});
|
||||
@@ -28,29 +30,39 @@ function create() {
|
||||
tankman.playAnim('tank');
|
||||
tankTalk.play();
|
||||
|
||||
new FlxTimer().start(4.1, function(ugly:FlxTimer)
|
||||
timer(4.1, function()
|
||||
{
|
||||
FlxTween.tween(FlxG.camera, {zoom: game.defaultCamZoom * 1.4}, 0.4, {ease: FlxEase.quadOut});
|
||||
FlxTween.tween(FlxG.camera, {zoom: game.defaultCamZoom * 1.3}, 0.7, {ease: FlxEase.quadInOut, startDelay: 0.45});
|
||||
game.gf.playAnim('sad', false, "DANCE");
|
||||
});
|
||||
|
||||
new FlxTimer().start(11, function(tmr:FlxTimer)
|
||||
{
|
||||
game.remove(tankman);
|
||||
tankman.destroy();
|
||||
|
||||
game.camHUD.visible = true;
|
||||
game.dad.visible = true;
|
||||
timer(11, function() {
|
||||
destroyDistorto = false;
|
||||
distorto.fadeOut((Conductor.crochet / 1000) * 5, 0);
|
||||
FlxTween.tween(FlxG.camera, {zoom: game.defaultCamZoom}, 0.7, {ease: FlxEase.quadInOut, startDelay: 0});
|
||||
|
||||
close();
|
||||
});
|
||||
}
|
||||
|
||||
function timer(duration:Float, callBack:Void->Void) {
|
||||
timers.push(new FlxTimer().start(duration, function(timer) {
|
||||
timers.remove(timer);
|
||||
callBack();
|
||||
}));
|
||||
}
|
||||
|
||||
function focusOn(char) {
|
||||
var camPos = char.getCameraPosition();
|
||||
game.camFollow.setPosition(camPos.x, camPos.y);
|
||||
camPos.put();
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
game.remove(tankman);
|
||||
game.camHUD.visible = true;
|
||||
game.dad.visible = true;
|
||||
for(timer in timers) timer.cancel();
|
||||
for(thing in [tankman, tankTalk]) thing.destroy();
|
||||
if(destroyDistorto) distorto.destroy();
|
||||
FlxTween.tween(FlxG.camera, {zoom: game.defaultCamZoom}, 0.7, {ease: FlxEase.quadInOut, startDelay: 0});
|
||||
}
|
||||
@@ -27,11 +27,6 @@ function create() {
|
||||
|
||||
stressCutscene.play();
|
||||
stressCutscene.onComplete = function() {
|
||||
for(spr in [gf, tankman, pico]) {
|
||||
spr.destroy();
|
||||
game.remove(spr);
|
||||
}
|
||||
game.camHUD.visible = game.dad.visible = game.gf.visible = true;
|
||||
close();
|
||||
};
|
||||
|
||||
@@ -59,8 +54,6 @@ function create() {
|
||||
}
|
||||
|
||||
function update(elapsed) {
|
||||
if (FlxG.keys.justPressed.F5)
|
||||
FlxG.resetState();
|
||||
switch(step) {
|
||||
case 0:
|
||||
lipSync(tankman, 0, 16750);
|
||||
@@ -133,4 +126,14 @@ function focusOn(char, snap:Bool = false) {
|
||||
game.camFollow.setPosition(camPos.x, camPos.y);
|
||||
if(snap) FlxG.camera.snapToTarget();
|
||||
camPos.put();
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
game.boyfriend.animation.finishCallback = null;
|
||||
game.camHUD.visible = game.boyfriend.visible = game.dad.visible = game.gf.visible = true;
|
||||
for(thing in [bf, gf, tankman, pico, stressCutscene]) {
|
||||
if(thing == null) continue;
|
||||
if(thing != stressCutscene) game.remove(thing);
|
||||
thing.destroy();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ import funkin.system.FunkinSprite;
|
||||
|
||||
var tankman:FunkinSprite;
|
||||
var tankTalk1, tankTalk2, bfBeep, distorto:FlxSound;
|
||||
var timers:Array<FlxTimer> = [];
|
||||
var destroyDistorto:Bool = true;
|
||||
|
||||
function create() {
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1}, 0.7, {ease: FlxEase.quadInOut});
|
||||
@@ -33,35 +35,46 @@ function create() {
|
||||
tankman.playAnim('1');
|
||||
tankTalk1.play();
|
||||
|
||||
new FlxTimer().start(3, function(tmr:FlxTimer) {
|
||||
timer(3, function() {
|
||||
focusOn(game.boyfriend);
|
||||
|
||||
new FlxTimer().start(1.5, function(t) {
|
||||
timer(1.5, function() {
|
||||
game.boyfriend.playAnim("singUP");
|
||||
bfBeep.play();
|
||||
|
||||
new FlxTimer().start(1.5, function(t) {
|
||||
timer(1.5, function() {
|
||||
focusOn(game.dad);
|
||||
tankTalk2.play();
|
||||
tankman.playAnim('2');
|
||||
|
||||
new FlxTimer().start(6.1, function(t) {
|
||||
game.remove(tankman);
|
||||
tankman.destroy();
|
||||
|
||||
game.camHUD.visible = true;
|
||||
game.dad.visible = true;
|
||||
timer(6.1, function() {
|
||||
destroyDistorto = false;
|
||||
distorto.fadeOut((Conductor.crochet / 1000) * 5, 0);
|
||||
|
||||
close();
|
||||
}, 1);
|
||||
}, 1);
|
||||
}, 1);
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function timer(duration:Float, callBack:Void->Void) {
|
||||
timers.push(new FlxTimer().start(duration, function(timer) {
|
||||
timers.remove(timer);
|
||||
callBack();
|
||||
}));
|
||||
}
|
||||
|
||||
function focusOn(char) {
|
||||
var camPos = char.getCameraPosition();
|
||||
game.camFollow.setPosition(camPos.x, camPos.y);
|
||||
camPos.put();
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
game.remove(tankman);
|
||||
game.camHUD.visible = true;
|
||||
game.dad.visible = true;
|
||||
for(timer in timers) timer.cancel();
|
||||
for(thing in [tankTalk1, tankTalk2, bfBeep, tankman]) thing.destroy();
|
||||
if(destroyDistorto) distorto.destroy();
|
||||
}
|
||||
Reference in New Issue
Block a user