fine tunes

This commit is contained in:
2026-05-15 20:25:34 +02:00
parent c9f0b5d704
commit 1346dba937
4 changed files with 9 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
import Phaser from "phaser"; import Phaser from "phaser";
import { Platform } from "./Platform";
export class ObstaclePlatformDisappearing extends Phaser.GameObjects.Rectangle { export class ObstaclePlatformDisappearing extends Phaser.GameObjects.Rectangle {
static readonly COLOR = 0x9966cc;
static readonly TRIGGER_DISTANCE = 110; static readonly TRIGGER_DISTANCE = 110;
static readonly FADE_MS = 200; static readonly FADE_MS = 200;
@@ -10,7 +10,7 @@ export class ObstaclePlatformDisappearing extends Phaser.GameObjects.Rectangle {
private vanished = false; private vanished = false;
constructor(scene: Phaser.Scene, x: number, y: number, width: number, height: number) { constructor(scene: Phaser.Scene, x: number, y: number, width: number, height: number) {
super(scene, x, y, width, height, ObstaclePlatformDisappearing.COLOR); super(scene, x, y, width, height, Platform.COLOR);
scene.add.existing(this); scene.add.existing(this);
scene.physics.add.existing(this, true); scene.physics.add.existing(this, true);
} }

View File

@@ -4,8 +4,8 @@ export class ObstacleSpikeTricky extends Phaser.GameObjects.Rectangle {
static readonly WIDTH = 40; static readonly WIDTH = 40;
static readonly HEIGHT = 20; static readonly HEIGHT = 20;
static readonly COLOR = 0xff8800; static readonly COLOR = 0xff8800;
static readonly TRIGGER_DISTANCE = 140; static readonly TRIGGER_DISTANCE = 55;
static readonly DISPLACEMENT = 80; static readonly DISPLACEMENT = 100;
declare body: Phaser.Physics.Arcade.StaticBody; declare body: Phaser.Physics.Arcade.StaticBody;

View File

@@ -4,7 +4,7 @@ export class Player extends Phaser.GameObjects.Rectangle {
static readonly SIZE = 32; static readonly SIZE = 32;
static readonly COLOR = 0xff4444; static readonly COLOR = 0xff4444;
static readonly MOVE_SPEED = 250; static readonly MOVE_SPEED = 250;
static readonly JUMP_VELOCITY = 600; static readonly JUMP_VELOCITY = 480;
declare body: Phaser.Physics.Arcade.Body; declare body: Phaser.Physics.Arcade.Body;

View File

@@ -77,8 +77,8 @@ export const LEVELS: readonly LevelDef[] = [
"....................", "....................",
"....................", "....................",
".E.................P", ".E.................P",
"######~~~~##########", "#######~~~##########",
"######^^^^##########", "#######~~~##########",
]), ]),
defineLevel("Csaló tüske és lépcső", [ defineLevel("Csaló tüske és lépcső", [
"....................", "....................",
@@ -93,8 +93,8 @@ export const LEVELS: readonly LevelDef[] = [
"....#####...........", "....#####...........",
"........#####.......", "........#####.......",
"............#####...", "............#####...",
"...............#####", "...............####.",
".........T.........P", ".........T........P#",
"####################", "####################",
]), ]),
]; ];