Add SmartFox object X times

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

fatax
Posts: 3
Joined: 17 Jan 2018, 12:29

Add SmartFox object X times

Postby fatax » 20 Nov 2018, 18:22

Hello there,
How can I add the specified number of SmartFox() or SFSObject() to my C# project?

For example

Code: Select all

for(var i=0; i<intVariable; i++) {
SmartFox sfs(i) = new SmartFox();
SmartFox sfs(i) = new SmartFox();
}

Or

Code: Select all

for(var i=0; i<intVariable; i++) {
ISFSObject loginobj(i) = new SFSObject();
ISFSObject loginobj(i) = new SFSObject();
}

etc
Thx in advance!
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Add SmartFox object X times

Postby Lapo » 21 Nov 2018, 08:48

Hi,
I don't understand what you're trying to do here...
The SmartFox object represent the connection between client and server and as such you need just one.

Maybe you can give us more details on what you're trying to accomplish?
Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 53 guests