Phaser 4 examples
GameObjects
- 13 examples
Examples 13
Animated Coin Collection EffectDemonstrates a custom Sprite class that manages its own spin animation, yoyo tween movement, sound effects, and self-destruction upon completion.Automated Sprite AI (Chick)A custom Arcade Physics Sprite class demonstrating automated movement, jumping on a timer, and collision-based direction switching.Bomb Sprite ClassAn example of extending the Arcade Physics Sprite class to create a custom bomb object with randomized velocity, angular rotation, and world bounds collision.Collectible Physics SpriteDemonstrates creating a custom Sprite class with Arcade Physics, featuring randomized bounce properties, collection logic, and physics body resetting.Custom Player Sprite ClassAn example of encapsulating player logic, such as movement, animations, and jumping, within a class that extends the Arcade Physics Sprite.Dynamic Texture PlatformsDemonstrates creating custom-sized platform sprites by stamping tile textures onto a Dynamic Texture and configuring them as static Arcade Physics bodies.Floating Score TextDemonstrates a custom BitmapText class that animates upwards and automatically destroys itself using a Tween, creating a classic floating score effect for points.Hamster Player ClassA demonstration of extending the Arcade Physics Sprite class to create a controllable character with encapsulated movement, jumping, and animation logic.Key Sprite ClassA custom Sprite class for a collectible item that demonstrates a floating tween animation, cross-scene audio triggering, and self-destruction.Mystery Box Platformer MechanicA custom Arcade Physics Sprite that reacts to being hit from below, triggering a bump animation and spawning an item.Platformer Enemy Edge DetectionA sprite that uses an Arcade Physics sensor to detect the edges of platforms and automatically change direction.Static Physics Sprite ClassDemonstrates creating a custom class that extends an Arcade Physics Sprite to define a static level exit with a specific texture frame and origin.Treasure Box Game ObjectA custom Arcade Physics Sprite class representing a treasure box that changes its animation frame and triggers a key spawn when activated.