Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / I write a function in UntitledViewControl , how to call it in c++ class? using Tier2

Author
Message
halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 2nd Nov 2011 07:10
in the function ,I will show the leader board. but I don't know how to call the function.

give my best
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Nov 2011 09:09
Would love to know too.

I think some day, someone should do a step by step tutorial how to:

* put game center leaderboard in t2
* put admobs, iads, etc in t2

I think it would be a good article for the newsletter
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Nov 2011 00:08
If you are using XCode, which sounds like you are, you can mark your .cpp files as obj-c by right clicking on the file, choosing GetInfo and check the source type is objcpp. Then you can use the pointer to the objective-c class as you would in objective-c.

At least that's my understanding of it.
halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 12th Nov 2011 04:22
Thank you. I create a global variable about UntitledViewControl. Then I call my function in the cpp file.

give my best
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Nov 2011 13:09
So in the end you can put in both obj-c & c++ code in the cpp file, and all would work, since its marked as type OBJCPP ?
halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 12th Nov 2011 15:50
Quote: "So in the end you can put in both obj-c & c++ code in the cpp file, and all would work, since its marked as type OBJCPP ?"

@bjadams yes, you are right.

The Miracrea Games
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Nov 2011 17:28
great will try it

Login to post a reply

Server time is: 2024-04-20 15:46:30
Your offset time is: 2024-04-20 15:46:30