コード例 #1
0
    public void DoLoadingShit()
    {
        loadingBar    = new Default.Namespace.Zbar();
        loadingBarPig = new Default.Namespace.Zbar();

//			world = new Default.Namespace.World();
        world.DoLoadingShit();

        this.RenderLoadingBar();

        util = new Default.Namespace.Utilities();

//			Default.Namespace.CGRect rect = Default.Namespace.UIScreen.bounds;

        float aspectRatio = (float)Screen.width / (float)Screen.height;
        float width       = 960.0f * aspectRatio;

        if (usingTextureResolution == TextureResolutionEnum.kTextureResolution_High)
        {
            world.SetScreenWidth(640.0f);
            world.SetScreenHeight(960.0f);

            world.SetScreenWidth(width);
        }
        else
        {
            world.SetScreenWidth(320.0f);
            world.SetScreenHeight(480.0f);
        }

//			world.SetScreenWidth(rect.Size.Width);
//          world.SetScreenHeight(rect.Size.Height);

        world.SetCoordinatesWidth(320.0f);
        world.SetCoordinatesHeight(480.0f);
        world.SetCoordinatesWidth(480.0f * aspectRatio);


        if (Default.Namespace.Globals.deviceIPad)
        {
//                world.SetCoordinatesWidth(384.0f);
//                world.SetCoordinatesHeight(512.0f);
            world.SetTileMapHeight(1024.0f);
        }
        else
        {
//                world.SetCoordinatesWidth(320.0f);
//                world.SetCoordinatesHeight(480.0f);
            world.SetTileMapHeight(480.0f);
        }

        ((world.game).tileMap).AllocTextures();
//            g_util = util;
//          g_myViewController = viewController;
        //CrashLandingAppDelegate.Print_free_memory();
        world.FirstInitialisation();
        // firstFrame = false;
        //CrashLandingAppDelegate.Print_free_memory();
    }