mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Camera controls can change camera.
This commit is contained in:
parent
27db941662
commit
3a3c24c7c4
2 changed files with 22 additions and 0 deletions
|
@ -46,11 +46,22 @@ var KeyControl = new Class({
|
|||
start: function ()
|
||||
{
|
||||
this.active = (this.camera !== null);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
stop: function ()
|
||||
{
|
||||
this.active = false;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
setCamera: function (camera)
|
||||
{
|
||||
this.camera = camera;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
update: function (delta)
|
||||
|
|
|
@ -81,11 +81,22 @@ var SmoothedKeyControl = new Class({
|
|||
start: function ()
|
||||
{
|
||||
this.active = (this.camera !== null);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
stop: function ()
|
||||
{
|
||||
this.active = false;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
setCamera: function (camera)
|
||||
{
|
||||
this.camera = camera;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
update: function (delta)
|
||||
|
|
Loading…
Add table
Reference in a new issue