generated from projects/testosmaximus
fix: update version to 1.3.1 in package.json and package-lock.json; add horizontal movement to RickGamePanel
This commit is contained in:
parent
3764292db4
commit
e22e32b29d
4
source/package-lock.json
generated
4
source/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@funky-flask-test/funky-flask-test",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@funky-flask-test/funky-flask-test",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.0.15",
|
||||
"typescript": "^5.8.3",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@funky-flask-test/funky-flask-test",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.jsx",
|
||||
"exports": {
|
||||
|
||||
@ -4,6 +4,7 @@ export class RickGamePanel {
|
||||
private x = 20
|
||||
private y = 180
|
||||
private vy = 0
|
||||
private vx = 2
|
||||
private onGround = false
|
||||
private gravity = 0.7
|
||||
private jumpPower = -12
|
||||
@ -69,6 +70,7 @@ export class RickGamePanel {
|
||||
|
||||
this.vy += this.gravity
|
||||
this.y += this.vy
|
||||
this.x += this.vx // <--- move right
|
||||
|
||||
if (this.y >= 180) {
|
||||
this.y = 180
|
||||
@ -86,6 +88,7 @@ export class RickGamePanel {
|
||||
requestAnimationFrame(this.frame)
|
||||
}
|
||||
|
||||
|
||||
private draw() {
|
||||
this.ctx.clearRect(0, 0, 300, 200)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user