Camera controls can change camera.

This commit is contained in:
Richard Davey 2018-01-04 16:39:52 +00:00
parent 27db941662
commit 3a3c24c7c4
2 changed files with 22 additions and 0 deletions

View file

@ -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)

View file

@ -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)