mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Merge pull request #2151 from jaminscript/logic-fix
Remove unnecessary variable
This commit is contained in:
commit
b3da35163a
1 changed files with 2 additions and 7 deletions
|
@ -431,20 +431,15 @@ Phaser.StateManager.prototype = {
|
||||||
|
|
||||||
if (this.states[key])
|
if (this.states[key])
|
||||||
{
|
{
|
||||||
var valid = false;
|
|
||||||
|
|
||||||
if (this.states[key]['preload'] || this.states[key]['create'] || this.states[key]['update'] || this.states[key]['render'])
|
if (this.states[key]['preload'] || this.states[key]['create'] || this.states[key]['update'] || this.states[key]['render'])
|
||||||
{
|
{
|
||||||
valid = true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (valid === false)
|
|
||||||
{
|
{
|
||||||
console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render");
|
console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions: preload, create, update or render");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue