fix constructor call process
parent
ee90adc22e
commit
42132fd2df
|
@ -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
|
||||
);
|
||||
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue