Connect to SFS with Javascript?
Posted: 06 Apr 2010, 04:38
I'm currently working on a project in Unity with Javascript, and I'd like to setup SFS to handle multiplayer. I've been using Javascript for years now, but I've never even touched C# so I would really rather not have to learn C# at this stage to make me entire game unless it is 100% necessary. Is there a way to connect to SFS using Javascript rather than C#? I've tried to rewrite the simple connection example from the API with Javascript, but it doesn't like the following:
which I changed to:
and get the error: InvalidCastException: Cannot cast from source type to destination type.
Code: Select all
SFSEvent.onConnection += HandleConnection;Code: Select all
SFSEvent.onConnection = Delegate.Combine(HandleConnection);