mirror of
https://github.com/wassname/phaser.git
synced 2026-09-09 11:28:47 +08:00
Added Matching Pairs game and updated fixed to camera example.
This commit is contained in:
+5
-5
@@ -30,8 +30,8 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||
parent = parent || '';
|
||||
state = state || null;
|
||||
|
||||
if (typeof transparent == 'undefined') { transparent = false; }
|
||||
if (typeof antialias == 'undefined') { antialias = true; }
|
||||
if (typeof transparent === 'undefined') { transparent = false; }
|
||||
if (typeof antialias === 'undefined') { antialias = true; }
|
||||
|
||||
/**
|
||||
* @property {number} id - Phaser Game ID (for when Pixi supports multiple instances).
|
||||
@@ -43,8 +43,6 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
|
||||
*/
|
||||
this.parent = parent;
|
||||
|
||||
// Do some more intelligent size parsing here, so they can set "100%" for example, maybe pass the scale mode in here too?
|
||||
|
||||
/**
|
||||
* @property {number} width - The Game width (in pixels).
|
||||
*/
|
||||
@@ -372,11 +370,13 @@ Phaser.Game.prototype = {
|
||||
*/
|
||||
setUpRenderer: function () {
|
||||
|
||||
/*
|
||||
if (this.device.trident)
|
||||
{
|
||||
// Until Pixi works with IE11
|
||||
// Pixi WebGL renderer on IE11 doesn't work correctly with masks, if you need them you may want to comment this block out
|
||||
this.renderType = Phaser.CANVAS;
|
||||
}
|
||||
*/
|
||||
|
||||
if (this.renderType === Phaser.HEADLESS || this.renderType === Phaser.CANVAS || (this.renderType === Phaser.AUTO && this.device.webGL === false))
|
||||
{
|
||||
|
||||
+4
-3
@@ -1044,12 +1044,13 @@ Phaser.Group.prototype = {
|
||||
* @param {number} returnType - How to return the data from this method. Either Phaser.Group.RETURN_NONE, Phaser.Group.RETURN_TOTAL or Phaser.Group.RETURN_CHILD.
|
||||
* @param {function} [callback=null] - Optional function that will be called on each matching child. Each child of the Group will be passed to it as its first parameter.
|
||||
* @param {Object} [callbackContext] - The context in which the function should be called (usually 'this').
|
||||
* @return {any} Returns either a numeric total (if RETURN_TOTAL was specified) or the child object.
|
||||
*/
|
||||
iterate: function (key, value, returnType, callback, callbackContext, args) {
|
||||
|
||||
if (returnType === Phaser.Group.RETURN_TOTAL && this._container.children.length === 0)
|
||||
{
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (typeof callback === 'undefined')
|
||||
@@ -1145,7 +1146,7 @@ Phaser.Group.prototype = {
|
||||
* Call this function to find out how many members of the group are alive.
|
||||
*
|
||||
* @method Phaser.Group#countLiving
|
||||
* @return {number} The number of children flagged as alive. Returns -1 if Group is empty.
|
||||
* @return {number} The number of children flagged as alive.
|
||||
*/
|
||||
countLiving: function () {
|
||||
|
||||
@@ -1157,7 +1158,7 @@ Phaser.Group.prototype = {
|
||||
* Call this function to find out how many members of the group are dead.
|
||||
*
|
||||
* @method Phaser.Group#countDead
|
||||
* @return {number} The number of children flagged as dead. Returns -1 if Group is empty.
|
||||
* @return {number} The number of children flagged as dead.
|
||||
*/
|
||||
countDead: function () {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user