Phaser 3.0 estim register8/18/2023 ![]() To enable this Game Object for physics you need to call (object, system) where object is this objectĪnd system is the Physics system you are using. Once a Game Object is enabled for physics you access all associatedīy default Game Objects won't add themselves to any physics system and their body property will be null. If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.īody is the Game Objects physics body. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. This is the image or texture used by the Sprite during rendering. ![]() The y coordinate (in world space) to position the Sprite at. The x coordinate (in world space) to position the Sprite at. Parameters NameĪ reference to the currently running game. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),Įvents (via Sprite.events), animation (via Sprite.animations), camera culling and more. ![]() ![]() Sprites are the lifeblood of your game, used for nearly everything visual.Īt its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |