You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Phaser/gameobjects/Button.ts
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,14 @@ module Phaser {
19
19
* Create a new <code>Button</code> object.
20
20
*
21
21
* @param game {Phaser.Game} Current game instance.
22
-
* @param [x] {number} the initial x position of the button.
23
-
* @param [y] {number} the initial y position of the button.
24
-
* @param [key] {string} Key of the graphic you want to load for this button.
22
+
* @param [x] {number} X position of the button.
23
+
* @param [y] {number} Y position of the button.
24
+
* @param [key] {string} The image key as defined in the Game.Cache to use as the texture for this button.
25
+
* @param [callback] {function} The function to call when this button is pressed
26
+
* @param [callbackContext] {object} The context in which the callback will be called (usually 'this')
27
+
* @param [overFrame] {string|number} This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
28
+
* @param [outFrame] {string|number} This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
29
+
* @param [downFrame] {string|number} This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
* Create a new Sprite with the physics automatically created and set to DYNAMIC. The Sprite position offset is set to its center.
99
103
*
@@ -182,13 +186,14 @@ module Phaser {
182
186
}
183
187
184
188
/**
185
-
* Create a tween object for a specific object.
189
+
* Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.
186
190
*
187
-
* @param obj Object you wish the tween will affect.
191
+
* @param obj {object} Object the tween will be run on.
192
+
* @param [localReference] {bool} If true the tween will be stored in the object.tween property so long as it exists. If already set it'll be over-written.
188
193
* @return {Phaser.Tween} The newly created tween object.
0 commit comments