Skip to content

Commit

Permalink
Changed to font that is free for commercial use.
Browse files Browse the repository at this point in the history
  • Loading branch information
KodyJKing committed Sep 9, 2019
1 parent 70bb5b4 commit 6480531
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kong Text font by cody@zone38.net
4 changes: 2 additions & 2 deletions src/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class Card extends GameObject {
let { mouse, buttons } = Input

if ( mouse )
mouse = game.globalTransform.inverseTransformPoint( mouse )
mouse = game.globalTransform.pointToLocal( mouse )

if ( buttons.Mouse0 ) {
if ( this.contains( mouse ) && !game.grabbing ) {
Expand Down Expand Up @@ -85,6 +85,6 @@ export default class Card extends GameObject {

Canvas.vimage( getImage( this.type.image ), position, dimensions )
//Text IDEALLY would print the card description contained on the card
Canvas.text( this.type.name, x + margin, y + height - margin, width - margin * 2, "20px pixel" );
Canvas.text( this.type.name.toUpperCase(), x + margin, y + height - margin, width - margin * 2, "20px pixel" );
}
}
11 changes: 6 additions & 5 deletions src/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ export default class Game {
// { volume: 0.35 }
)

// backgroundRed = 0
// backgroundGreen = 0
// backgroundBlue = 255
backgroundColor = rgb( 0, 0, 255 )

globalTransform = new Transform()
Expand Down Expand Up @@ -238,6 +235,9 @@ export default class Game {
Canvas.background( this.backgroundColor )

this.updateCameraShake( this.player.damageTime-- )
// this.transformTest()

Canvas.push()
Canvas.transform( this.globalTransform )

let backgroundY = 150
Expand All @@ -249,8 +249,7 @@ export default class Game {

//Level Count
Canvas.fillStyle( rgb( 255, 0, 0 ) )
.text( "level" + enemyCount, Canvas.canvas.clientWidth / 2 - 45, 30, 100, "40px pixel" );

.text( "LEVEL" + enemyCount, Canvas.canvas.clientWidth / 2 - 45, 30, 100, "40px pixel" );

for ( let pawn of this.pawns )
pawn.draw()
Expand All @@ -275,6 +274,8 @@ export default class Game {
Canvas.text( "You Win", winMessageX, winMessageY, winMessageWidth, "400px pixel" );
}

Canvas.pop()

if ( this.player.damageTime > 0 )
Canvas.background( rgba( 255, 0, 0, Math.sqrt( this.player.damageTime / 160 ) ) )
}
Expand Down
2 changes: 1 addition & 1 deletion src/Pawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class Pawn extends GameObject {
.text(
this.health.toString() + "/" + this.maxHealth.toString(),
healthNumPos.x, healthNumPos.y,
textWidth, "25px pixel"
textWidth, "20px pixel"
)
}

Expand Down
Binary file removed www/assets/arcadeClassic.ttf
Binary file not shown.
Binary file added www/assets/kongtext.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@font-face {
font-family: "pixel";
src: url("/assets/arcadeClassic.ttf")
src: url("/assets/kongtext.ttf")
}
</style>
</head>
Expand Down

0 comments on commit 6480531

Please sign in to comment.