//  ////////////////////////////////////////////////     State Array Setting...
    void SetStateArray()
    {
        mSttArr = new StateArray();

        mSttArr.AddAMember("InitPurchase", 5f);
        mSttArr.AddEntryAction(() => {
            mCount = 1;
        });
        mSttArr.AddExitCondition(() => {
            return(true);
        }); // !AgStt.mIAP.mIsUiLocked; });
        mSttArr.AddTimeOutProcess(100f, () => {
            Application.LoadLevel("menu");
        });

        mSttArr.AddAMember("Purchasing", 3f);
//        mSttArr.AddExitCondition (() => {
//            //return !AgStt.mIAP.mSendPackBool.mIsStarted;
//        });
        mSttArr.AddExitAction(() => {
            mCount = 1;
        });
        mSttArr.AddTimeOutProcess(50f, () => {
            Application.LoadLevel("menu");
        });

        //mSttArr.AddAMember ("CheckFile", 2f);

        mSttArr.AddAMember("Rest", 0f);
        mSttArr.AddExitCondition(() => {
            return(false);
        });

        mSttArr.SetSerialExitMember(pClose: false);
        mSttArr.SetStateWithNameOf("Rest");
    }
Beispiel #2
0
    //  ////////////////////////////////////////////////     State Array Setting...
    void SetStateArray()
    {
        mSttArr = new StateArray();

        mSttArr.AddAMember("InitPurchase", 3f);
        mSttArr.AddExitCondition( ()=> {
            return !Ag.mIAP.mIsUiLocked; });
        mSttArr.AddTimeOutProcess(20f, ()=> { // Go to Next Stage..
        });

        mSttArr.AddAMember("CheckFile", 5f);
        mSttArr.AddEntryAction( ()=>{
            Ag.mIAP.CheckUnsentTransaction();
        });
        mSttArr.AddExitCondition( ()=>{
            if (Ag.mIAP.mIsUiLocked) Application.LoadLevel("menu");
            return true;
        } );

        mSttArr.AddAMember("Rest", 0f);
        mSttArr.AddExitCondition( ()=> { return false; } );

        mSttArr.SetSerialExitMember( pClose:false );
        mSttArr.SetStateWithNameOf("Rest");
    }