week 7 stuff + video cutscenes
This commit is contained in:
@@ -82,33 +82,35 @@ function createPost() {
|
||||
FlxG.camera.antialiasing = false;
|
||||
FlxG.camera.pixelPerfectRender = true;
|
||||
FlxG.game.stage.quality = 2;
|
||||
|
||||
var newNoteCamera = new FlxCamera();
|
||||
newNoteCamera.bgColor = 0; // transparent
|
||||
FlxG.cameras.add(newNoteCamera, false);
|
||||
|
||||
var pixelSwagWidth = Note.swagWidth + (daPixelZoom - (Note.swagWidth % daPixelZoom));
|
||||
// TODO: multikey support??
|
||||
for(s in 0...4) {
|
||||
var i = 0;
|
||||
for(str in [cpuStrums.members[s], playerStrums.members[s]]) {
|
||||
// TODO: middlescroll???
|
||||
str.x = (FlxG.width * (0.25 + (0.5 * i))) + (pixelSwagWidth * (s - 2));
|
||||
str.x -= str.x % daPixelZoom;
|
||||
str.cameras = [newNoteCamera];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
iconP1.antialiasing = false;
|
||||
iconP2.antialiasing = false;
|
||||
|
||||
makeCameraPixely(camGame);
|
||||
makeCameraPixely(newNoteCamera);
|
||||
defaultCamZoom /= daPixelZoom;
|
||||
}
|
||||
}
|
||||
|
||||
function onStartCountdown() {
|
||||
var newNoteCamera = new FlxCamera();
|
||||
newNoteCamera.bgColor = 0; // transparent
|
||||
FlxG.cameras.add(newNoteCamera, false);
|
||||
|
||||
var pixelSwagWidth = Note.swagWidth + (daPixelZoom - (Note.swagWidth % daPixelZoom));
|
||||
// TODO: multikey support??
|
||||
for(s in 0...4) {
|
||||
var i = 0;
|
||||
for(str in [cpuStrums.members[s], playerStrums.members[s]]) {
|
||||
// TODO: middlescroll???
|
||||
str.x = (FlxG.width * (0.25 + (0.5 * i))) + (pixelSwagWidth * (s - 2));
|
||||
str.x -= str.x % daPixelZoom;
|
||||
str.cameras = [newNoteCamera];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
makeCameraPixely(newNoteCamera);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to make any camera pixelly (you wont be able to zoom with it anymore!)
|
||||
*/
|
||||
@@ -131,6 +133,13 @@ var pixellyCameras = [];
|
||||
var pixellyShaders = [];
|
||||
|
||||
function updatePost(elapsed) {
|
||||
|
||||
if (enableCameraHacks) {
|
||||
notes.forEach(function(n) {
|
||||
n.y -= n.y % daPixelZoom;
|
||||
});
|
||||
}
|
||||
|
||||
for(e in pixellyCameras) {
|
||||
if (!e.exists) continue;
|
||||
e.zoom = 1 / daPixelZoom / Math.min(FlxG.scaleMode.scale.x, FlxG.scaleMode.scale.y);
|
||||
@@ -138,10 +147,4 @@ function updatePost(elapsed) {
|
||||
for(e in pixellyShaders) {
|
||||
e.pixelZoom = 1 / daPixelZoom / Math.min(FlxG.scaleMode.scale.x, FlxG.scaleMode.scale.y);
|
||||
}
|
||||
|
||||
if (enableCameraHacks) {
|
||||
notes.forEach(function(n) {
|
||||
n.y -= n.y % daPixelZoom;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ function update(elapsed) {
|
||||
if (option == "Resume" || option == "Exit to menu") {
|
||||
canDoShit = false;
|
||||
for(t in texts) t.visible = false;
|
||||
songText.visible = false;
|
||||
hand.visible = songText.visible = false;
|
||||
FlxTween.tween(bg, {"scale.y": 0}, 0.125, {ease: FlxEase.cubeOut, onComplete: function() {
|
||||
selectOption();
|
||||
}});
|
||||
|
||||
Reference in New Issue
Block a user