Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNakagawa committed Oct 31, 2023
2 parents fbf2437 + 6e91351 commit 10727a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _posts/2023-10-25-Game.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function checkForOverlap(object1, object2) {

var fadingFrame = 0;
var fadingCtx = fadingCanvas.getContext("2d")
function Fadeframe(oldDisplay,newDisplay,ac1,ac2,func){
function Fadeframe(oldDisplay,newDisplay,ac1,ac2,func,aud1,aud2){
console.log(func)
fadingFrame = (fadingFrame+1)%(2*fps);

Expand Down Expand Up @@ -256,6 +256,8 @@ if(fadingFrame == fps){ //change canvas, stop updating canvas1, start updating n
ac1 = false;
ac2 = true;
func();
if (!aud1 == null){aud1.pause()};
if (!aud2 == null){aud2.play()};
}
setTimeout(function() {
if(fadingFrame == 0){
Expand Down

0 comments on commit 10727a6

Please sign in to comment.