예제 #1
0
    public void initialize()
    {
        mInterfaceManager = new NewInterfaceManager(mManager, this);
        mInterfaceManager.initialize();
        //mInterfaceManager.mFlatCamera.set_render_texture_mode(true);
        mInterfaceManager.setup_bb();

        mSunsetManager = new SunsetManager(mManager, this);
        mSunsetManager.initialize();
        mSunsetManager.mFlatCamera.set_render_texture_mode(true);
        mManager.mAssetLoader.new_load_asset_bundle("SUNSET",
                                                    delegate(AssetBundle aBundle){
            mSunsetManager.sunset_loaded_callback(aBundle, "SUNSET");
        }
                                                    );

        mGiftManager = new GiftManager(mManager, this);
        mGiftManager.initialize();
        mManager.mAssetLoader.new_load_asset_bundle("GIFT",
                                                    delegate(AssetBundle aBundle){
            mGiftManager.gift_loaded_callback(aBundle, "GIFT");
        }
                                                    );

        mChoosingManager = new ChoosingManager(mManager, this);
        mChoosingManager.initialize();
        mChoosingManager.mFlatCamera.set_render_texture_mode(true);

        mFlatCamera = new FlatCameraManager(new Vector3(-23200, 3500, 0), 10);
        mFlatCamera.Camera.depth = 100;
        mFlatCamera.fit_camera_to_screen();

        mSunsetImage = new FlatElementImage(mSunsetManager.mFlatCamera.RT, 0);
        var hs = Vector3.one * mFlatCamera.Width / mSunsetImage.mImage.PixelDimension.x;

        //TODO extra space for rounded edges
        //hs.y += 600; //additional 300 pixels..
        mSunsetImage.HardScale    = hs;
        mSunsetImage.HardPosition = mFlatCamera.get_point(Vector3.zero) + Vector3.up * mSunsetImage.BoundingBox.height;
        //mSunsetImage.HardShader = mManager.mReferences.mRenderTextureShader;
        mSunsetImage.PositionInterpolationMinLimit = 10;         //so it doesn't take forever to entirely cover the image underneath
        mElement.Add(mSunsetImage);


        mChoosingImage              = new FlatElementImage(mChoosingManager.mFlatCamera.RT, 1);
        mChoosingImage.HardScale    = Vector3.one * mFlatCamera.Width / mChoosingImage.mImage.PixelDimension.x;
        mChoosingImage.HardPosition = mFlatCamera.get_point(Vector3.zero) + Vector3.right * mChoosingImage.BoundingBox.width;
        //mChoosingImage.HardShader = mManager.mReferences.mRenderTextureShader;
        mElement.Add(mChoosingImage);


        //this is silly, we forec the interface image to appear above everything else pretty much just so we can have text bubbles show above everything
        //kind of a dumb way to do it oh well.

        /*
         * mInterfaceImage = new FlatElementImage(mInterfaceManager.mFlatCamera.RT,1);
         * mInterfaceImage.HardScale = Vector3.one * mFlatCamera.Width/mInterfaceImage.mImage.PixelDimension.x;
         * mInterfaceImage.HardPosition = mFlatCamera.get_point(Vector3.zero);
         * mElement.Add(mInterfaceImage);*/

        mIsInitialized = true;
    }
예제 #2
0
 public UnlockAnnouncer(SunsetManager aSunset)
 {
     mSunset = aSunset;
     TED     = new TimedEventDistributor();
 }