From c198ced26cf860939570278c1e3080dfcfd8cf03 Mon Sep 17 00:00:00 2001 From: miwr Date: Tue, 8 Apr 2025 09:51:15 +0200 Subject: [PATCH] new colors --- src/app/mario/cloud.png | Bin 0 -> 1772 bytes src/app/mario/mario.component.html | 2 +- src/app/mario/mario.component.scss | 3 ++- src/app/mario/mario.component.ts | 8 +++++--- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/app/mario/cloud.png diff --git a/src/app/mario/cloud.png b/src/app/mario/cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..0ebf9dfc41bffeae44c62e3e09a627003bfe44ee GIT binary patch literal 1772 zcma)+`B%~j8^ynX0!eP?H4{e*^_zx<6@ zQi+u^j#jpi3o~wM)~KcCPN8p$islk-Q?K(EymQWTpL@>dhx^Mt=VqUFcUD!=RRI7% zmE_{+we8QgMMJ{3f7_*tC;)(P=?)I3Ne&JeCW{e4zYq=p`wP+vj=Qwk>UD&?BKw%C zBxuAwJ6$$+)9@-K%g`IyXkV*lT=bJ2{}R~I;mO1i*BboenXyBIfB0x9+1QRNn>g*p ze!fV$;gpN$`a3CcAy%QLp}VU(;6{M$t7t-*>*bO08l9hS&%76n=S= zLM}jGh-ImJt=yNDkSAb%DPtkg0HLC4c#JZK{4fPKuNy19hX|4b4jz{-^weopVYO5w zo9MJ3)O4DZQ-+%+DVxMJ0RP(O6P!p?>bz3eEMJz(Urv5K{_4{LLdTkw(Qb?tZMOms zJLT*MyaSAYLyxlF4{nnkOqYN-05CWDN020;O~N)rut{!Ch>uE$of?+eyY%a}5t{Af z&vsx$M~BC-0S8uiC_9{nNu;wQG0r5n(|+k{y8%F{gXC!EoisW>5pelhyk6($g{cxx zg4YjiqC)Ln6*B`B)67qXD>Y)|&Ol`5Gi_6GL%BB z9L>E~sr4eLy5x4wGNrBRcE9CIfudIdi#se>F1K9R{93MPZFX`~5Z*9fU?IJ)4F=e>&-`3t)6JFR0`uSMt$v%(arkf*EI|hC7(WyL zW3{@>?1EAZM6MhYIY3_V!`UC}i_g3$OOuv*^-LO%QBCW09z%b^j`R1*olHVAIR?@KnoR;s{phFC-LcnOBecL(IH>ez+vZ`S9$mZ;GQ# zHRhMl;3?%Mgf%La^%!jd!>7D0wv**9v7?e{N0a%KQAb(kOpjNOT>P8=ZMBDWdn1S& zqV?wfP80*7z8TR|N zQan2UR^y%XmLLp&XSG;aBx=KWz-bnp`iY)gto@OxYg<3Q>*GA=qe)E>Gy0nOHalHr z-IOByLmG!YWG$MofiNo$Zpd$b-drfcV{pD?OF;CnsC>}&#yxLioB|a_USb;?BEYT zWq)-6LO{hmEYp`{2@9het&oY{n`OP#pQ#^9ML_=)OT{YF{{cIJ`$_yWAD*`BzUc=0l$ wA}}5u80s;YvPa%hS|%(!A~*OylcE2P;TVeQ@1Ogte|z-+l9Rh*ojo< +
\ No newline at end of file diff --git a/src/app/mario/mario.component.scss b/src/app/mario/mario.component.scss index 80e2ada..f0a5f83 100644 --- a/src/app/mario/mario.component.scss +++ b/src/app/mario/mario.component.scss @@ -6,5 +6,6 @@ body, html { canvas { display: block; - background-color: #c2f0c2; + background-color: #dceaff; + background-image: url("./cloud.png"); } \ No newline at end of file diff --git a/src/app/mario/mario.component.ts b/src/app/mario/mario.component.ts index a5694cf..a09f341 100644 --- a/src/app/mario/mario.component.ts +++ b/src/app/mario/mario.component.ts @@ -18,10 +18,10 @@ import { JumpService } from '../jump.service'; dx: 0, dy: 0, speed: 4, - jumpStrength: 25, + jumpStrength: 20, gravity: 0.5, onGround: false, - color: 'red' + color: 'orange' }; private canvas!: HTMLCanvasElement; @@ -129,7 +129,7 @@ import { JumpService } from '../jump.service'; this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); // Ground - this.ctx.fillStyle = '#654321'; + this.ctx.fillStyle = '#044d00'; this.ctx.fillRect(0, this.canvas.height - 60, this.canvas.width, 60); // Platforms @@ -154,6 +154,8 @@ import { JumpService } from '../jump.service'; this.ctx.fillStyle = 'black'; this.ctx.fillText('🏁', this.canvasWidth - 60, this.canvas.height - 170); + + // Counter this.ctx.fillStyle = 'black'; this.ctx.font = '20px Arial'; this.ctx.fillText(`Jumps: ${this.totalJumps}`, this.canvas.width - 150, 30);