Understanding Statistics - frames per second

Hi All,
I have been using Xamarin for the last 2 years with some database apps and now trying some CocosSharp games.

I am trying to display the Statistics as listed here Understanding Statistics
However as silly as it sounds I can not find the

  public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)

I am working with the iOS CocosSharp Game Showcase template.
Is my problem to do with the new templates ?
Or is there another way to do this now?

System is as follows -
Xamarin Studio Version 5.10.1 (build3)
Xcode 7.0.1 (8228) Build 7A1001
Xamarin.iO Version: (Indie Edition) Hash: eb4c1ef Branch: master Build date: 2015-12-01 02:12:30-0500
Mac OS X 10.11.1

CocosSharp Version
CocosSharp project templates

Secondly.....the project templates wants to update itself all the time. Even though the update is the latest version it wants to update itself.

With the samples they all appear to have "profiling" enabled and I do not have that installed.
I cannot find where to disable "profiling".
The only way I have found to do it is to manually edit the *.csprof file and change from true to false

Any help would be great.
Thank you

Best Answer


  • PaulKellyPaulKelly USMember ✭✭

    Upon further inspection I have found the following -

    From the sample games on GitHub, I have as follows

    public class AppDelegate : CCApplicationDelegate
        public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow)
            application.ContentRootDirectory = "Content";

    However the CocosSharp project templates are as follows

       [Register ("AppDelegate")]
    public class AppDelegate : UIApplicationDelegate
        // class-level declarations
        public override UIWindow Window {

    Hence why I can not find the "ApplicationDidFinishLaunching" as my AppDelegate inherits from UIApplicationDelegate instead of CCApplicationDelegate.

    Which should I use and why?
    Are the templates being updated any time soon?

    Thank you

  • PaulKellyPaulKelly USMember ✭✭

    Answered my own question -
    For CocosSharp Version with CocosSharp project templates
    Enable Game Stats as follows

    public override void ViewDidLoad ()
            base.ViewDidLoad ();
            if (GameView != null) {
                // Set loading event to be called once game view is fully initialised
                GameView.ViewCreated += LoadGame;
    void LoadGame (object sender, EventArgs e)
            CCGameView gameView = sender as CCGameView;
            if (gameView != null) 
                gameView.Stats.Enabled = true;  // <------------------- This Line !!!
  • PaulKellyPaulKelly USMember ✭✭

    I found my own answer as shown above.
    Can I / how do I mark this as answered in case someone else has the same problem?

Sign In or Register to comment.