MonoTouch and GameKit
Hi all,
Does anyone have a simple example that shows how to use the GameKit's GMSession and GKPeerPickerController classes within MonoTouch.
I've tried following the GKTank example ( developer.apple.com/iphone/library/samplecode/GKTank/listing4.html ), but am finding Objective C hard going and can't work out how to hook up this magical GKSession.Delegate or tap into the GKSession.ReceiveData events. To clarify I'm having a hard time working out how ObjC maps to the C# equivalents.
GKPeerPickerController peerPickerController = new GKPeerPickerController();
peerPickerController.Delegate = new GKPeerPickerControllerDelegate(); // Not too sure about this...
Then tried
peerPickerController.Delegate.PeerConnected += new EventHandler<GKPeerConnectionEventArgs>( MyPeerConnectedMethod );
but that gave me a compiler error of...
"Cannot assign to 'MyPeerConnectedMethod' because it is a method group"
Any ideas/pointers?
Does anyone have a simple example that shows how to use the GameKit's GMSession and GKPeerPickerController classes within MonoTouch.
I've tried following the GKTank example ( developer.apple.com/iphone/library/samplecode/GKTank/listing4.html ), but am finding Objective C hard going and can't work out how to hook up this magical GKSession.Delegate or tap into the GKSession.ReceiveData events. To clarify I'm having a hard time working out how ObjC maps to the C# equivalents.
GKPeerPickerController peerPickerController = new GKPeerPickerController();
peerPickerController.Delegate = new GKPeerPickerControllerDelegate(); // Not too sure about this...
Then tried
peerPickerController.Delegate.PeerConnected += new EventHandler<GKPeerConnectionEventArgs>( MyPeerConnectedMethod );
but that gave me a compiler error of...
"Cannot assign to 'MyPeerConnectedMethod' because it is a method group"
Any ideas/pointers?
| Messages In This Thread |
|
MonoTouch and GameKit - savage - Nov 13, 2009 09:12 AM
MonoTouch and GameKit - savage - Nov 23, 2009, 03:59 AM
|
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| GameKit bluetooth failing on iPad? | Cirdan | 0 | 3,164 |
Sep 3, 2010 01:20 AM Last Post: Cirdan |
|
| Question re: GameKit and online connection types | Malarkey | 0 | 1,726 |
Jan 8, 2010 05:12 PM Last Post: Malarkey |
|
| GameKit - Bluetooth not shutting off when disconnected | bruss14 | 0 | 2,067 |
Aug 5, 2009 12:20 PM Last Post: bruss14 |
|

