fix constructor call process
parent
ee90adc22e
commit
42132fd2df
|
@ -37,11 +37,21 @@ GameLib.Socket = function(
|
||||||
|
|
||||||
this.connected = false;
|
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(
|
GameLib.Component.call(
|
||||||
this,
|
this,
|
||||||
{
|
linkedObjects
|
||||||
server : GameLib.Server
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,13 +35,6 @@ GameLib.Socket.Cast = function(
|
||||||
socket,
|
socket,
|
||||||
apiSocketCast
|
apiSocketCast
|
||||||
);
|
);
|
||||||
|
|
||||||
GameLib.Component.call(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
source : GameLib.Component
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.Socket.Cast.prototype = Object.create(GameLib.API.Socket.Cast.prototype);
|
GameLib.Socket.Cast.prototype = Object.create(GameLib.API.Socket.Cast.prototype);
|
||||||
|
|
|
@ -36,13 +36,6 @@ GameLib.Socket.Receive = function(
|
||||||
apiSocketReceive
|
apiSocketReceive
|
||||||
);
|
);
|
||||||
|
|
||||||
GameLib.Component.call(
|
|
||||||
this,
|
|
||||||
{
|
|
||||||
destination : GameLib.Component
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.Socket.Receive.prototype = Object.create(GameLib.API.Socket.Receive.prototype);
|
GameLib.Socket.Receive.prototype = Object.create(GameLib.API.Socket.Receive.prototype);
|
||||||
|
|
Loading…
Reference in New Issue