Renamed setSize to setBodySize to avoid conflict with Game Object method

This commit is contained in:
Richard Davey 2017-08-17 03:55:17 +01:00
parent 18c00abe04
commit 100f4fc013
4 changed files with 5 additions and 5 deletions

View file

@ -159,7 +159,7 @@ var Body = new Class({
);
},
setSize: function (x, y, width, height)
resetSize: function (x, y, width, height)
{
this.pos.x = x;
this.pos.y = y;

View file

@ -113,7 +113,7 @@ var World = new Class({
{
if (wall)
{
wall.setSize(x, y, width, height);
wall.resetSize(x, y, width, height);
}
else
{

View file

@ -1,6 +1,6 @@
var Offset = {
setSize: function (width, height)
setBodySize: function (width, height)
{
if (height === undefined) { height = width; }
@ -17,7 +17,7 @@ var Offset = {
if (width)
{
this.setSize(width, height);
this.setBodySize(width, height);
}
return this;

View file

@ -10,7 +10,7 @@ var SetGameObject = {
if (setSize)
{
this.setSize(gameObject.width, gameObject.height);
this.setBodySize(gameObject.width, gameObject.height);
}
}
else