fix constructor call process

beta.r3js.org
-=yb4f310 2017-12-30 11:42:31 +01:00
parent ee90adc22e
commit 42132fd2df
3 changed files with 13 additions and 17 deletions

View File

@ -37,11 +37,21 @@ GameLib.Socket = function(
this.connected = false;
var linkedObjects = {
server : GameLib.Server
};
if (this.socketType === GameLib.API.Socket.TYPE_CAST) {
linkedObjects.source = GameLib.Component;
}
if (this.socketType === GameLib.API.Socket.TYPE_RECEIVE) {
linkedObjects.destination = GameLib.Component;
}
GameLib.Component.call(
this,
{
server : GameLib.Server
}
linkedObjects
);
};

View File

@ -35,13 +35,6 @@ GameLib.Socket.Cast = function(
socket,
apiSocketCast
);
GameLib.Component.call(
this,
{
source : GameLib.Component
}
);
};
GameLib.Socket.Cast.prototype = Object.create(GameLib.API.Socket.Cast.prototype);

View File

@ -36,13 +36,6 @@ GameLib.Socket.Receive = function(
apiSocketReceive
);
GameLib.Component.call(
this,
{
destination : GameLib.Component
}
);
};
GameLib.Socket.Receive.prototype = Object.create(GameLib.API.Socket.Receive.prototype);