Skip to content

Commit e0899bf

Browse files
committed
Added jsdocs
1 parent 9188781 commit e0899bf

31 files changed

Lines changed: 2569 additions & 323 deletions

src/gameobjects/sprite/Sprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var SpriteRender = require('./SpriteRender');
88
* A Sprite Game Object.
99
*
1010
* A Sprite Game Object is used for the display of both static and animated images in your game.
11-
* Sprites can have inpt events and physics bodies. They can also be tweened, tinted, scrolled
11+
* Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled
1212
* and animated.
1313
*
1414
* The main difference between a Sprite and an Image Game Object is that you cannot animate Images.

src/physics/arcade/ArcadeImage.js

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,54 @@ var Class = require('../../utils/Class');
22
var Components = require('./components');
33
var Image = require('../../gameobjects/image/Image');
44

5+
/**
6+
* @classdesc
7+
* An Arcade Physics Image Game Object.
8+
*
9+
* An Image is a light-weight Game Object useful for the display of static images in your game,
10+
* such as logos, backgrounds, scenery or other non-animated elements. Images can have input
11+
* events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
12+
* Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.
13+
*
14+
* @class Image
15+
* @extends Phaser.GameObjects.Image
16+
* @memberOf Phaser.Physics.Arcade
17+
* @constructor
18+
* @since 3.0.0
19+
*
20+
* @extends Phaser.Physics.Arcade.Components.Acceleration
21+
* @extends Phaser.Physics.Arcade.Components.Angular
22+
* @extends Phaser.Physics.Arcade.Components.Bounce
23+
* @extends Phaser.Physics.Arcade.Components.Debug
24+
* @extends Phaser.Physics.Arcade.Components.Drag
25+
* @extends Phaser.Physics.Arcade.Components.Enable
26+
* @extends Phaser.Physics.Arcade.Components.Friction
27+
* @extends Phaser.Physics.Arcade.Components.Gravity
28+
* @extends Phaser.Physics.Arcade.Components.Immovable
29+
* @extends Phaser.Physics.Arcade.Components.Mass
30+
* @extends Phaser.Physics.Arcade.Components.Size
31+
* @extends Phaser.Physics.Arcade.Components.Velocity
32+
* @extends Phaser.GameObjects.Components.Alpha
33+
* @extends Phaser.GameObjects.Components.BlendMode
34+
* @extends Phaser.GameObjects.Components.Depth
35+
* @extends Phaser.GameObjects.Components.Flip
36+
* @extends Phaser.GameObjects.Components.GetBounds
37+
* @extends Phaser.GameObjects.Components.Origin
38+
* @extends Phaser.GameObjects.Components.Pipeline
39+
* @extends Phaser.GameObjects.Components.ScaleMode
40+
* @extends Phaser.GameObjects.Components.ScrollFactor
41+
* @extends Phaser.GameObjects.Components.Size
42+
* @extends Phaser.GameObjects.Components.Texture
43+
* @extends Phaser.GameObjects.Components.Tint
44+
* @extends Phaser.GameObjects.Components.Transform
45+
* @extends Phaser.GameObjects.Components.Visible
46+
*
47+
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
48+
* @param {number} x - The horizontal position of this Game Object in the world.
49+
* @param {number} y - The vertical position of this Game Object in the world.
50+
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
51+
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
52+
*/
553
var ArcadeImage = new Class({
654

755
Extends: Image,
@@ -23,9 +71,6 @@ var ArcadeImage = new Class({
2371

2472
initialize:
2573

26-
// x/y is the center of the Image / Body, just like other default Game Objects
27-
// This needs a body adding to it, so create it via the AP Factory, or add it to an AP Group
28-
2974
function ArcadeImage (scene, x, y, texture, frame)
3075
{
3176
Image.call(this, scene, x, y, texture, frame);

0 commit comments

Comments
 (0)