mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 00:53:42 +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])
|
||||
{
|
||||
var valid = false;
|
||||
|
||||
if (this.states[key]['preload'] || this.states[key]['create'] || this.states[key]['update'] || this.states[key]['render'])
|
||||
{
|
||||
valid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (valid === false)
|
||||
else
|
||||
{
|
||||
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 true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue