Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
added portal item to the isle of debug
Browse files Browse the repository at this point in the history
  • Loading branch information
loglot committed Aug 30, 2024
1 parent 405437d commit 4ac445e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion system/map-player/map/mapCarryers/Enabler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Enabler {
this.hitboxes[this.hitboxes.length] = new Hitbox(-16390,6058,188,894, false, "bazooka", true )
this.hitboxes[this.hitboxes.length] = new Hitbox(-16851,6084,214,866, false, "shotgun", true )
this.hitboxes[this.hitboxes.length] = new Hitbox(-17277,6079,191,807, false, "dash", true )
this.hitboxes[this.hitboxes.length] = new Hitbox(-17750,6134,193,744, false, "null", true )
this.hitboxes[this.hitboxes.length] = new Hitbox(-17750,6134,193,744, false, "portal", true )



Expand Down
24 changes: 24 additions & 0 deletions system/map-player/player/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ export class Player {
this.game.held.makeImg()
}

if(this.orbAlpha <= 0 && this.anim == true && this.Held.get("portal") == false && this.change == "portal") {
this.Held.set("portal",true)
this.game.gameDisplayer.targetR = 167
this.game.gameDisplayer.targetG = 216
this.game.gameDisplayer.targetB = 199
this.game.gameDisplayer.gradMinTarget = 700
this.game.gameDisplayer.gradMaxTarget = 2000
this.anim = false
this.game.held.selected = 5
this.game.held.makeImg()
}



}
Expand Down Expand Up @@ -421,6 +433,18 @@ export class Player {
document.getElementsByTagName("body")[0].style.cursor = "url('http://wiki-devel.sugarlabs.org/images/e/e2/Arrow.cur'), auto";
}
}
if(valC == "portal") {
if(this.anim == false && this.Held.get("portal") != true){
this.orbAlpha = 1
this.anim = true
await this.sleep(750)
this.game.audio.powerUpSound()
await this.sleep(750)
this.change = "portal"
this.mousevis = true
document.getElementsByTagName("body")[0].style.cursor = "url('http://wiki-devel.sugarlabs.org/images/e/e2/Arrow.cur'), auto";
}
}

}

Expand Down
4 changes: 2 additions & 2 deletions system/map-player/player/heldItems/portalMaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export class Portals{



this.velX = this.trajectory.x - (this.game.player.velX/30)
this.velY = this.trajectory.y - (this.game.player.velY/30)
this.velX = this.trajectory.x - (this.game.player.velX/50)
this.velY = this.trajectory.y - (this.game.player.velY/50)
this.state = 1
this.speed = this.speedSet
}
Expand Down

0 comments on commit 4ac445e

Please sign in to comment.