Example #1
0
    private void UpdateGil()
    {
        Boolean flag = true;

        if (this.gilValue.current < this.gilValue.value)
        {
            UInt32 num = (UInt32)((this.gilValue.current + this.gilValue.step > this.gilValue.value) ? (this.gilValue.value - this.gilValue.current) : this.gilValue.step);
            if (num != 0u)
            {
                flag = false;
                this.gilValue.current += num;
                if (9999999u < FF9StateSystem.Common.FF9.party.gil + num)
                {
                    num = 9999999u - FF9StateSystem.Common.FF9.party.gil;
                    this.gilValue.current = this.gilValue.value;
                }
                FF9StateSystem.Common.FF9.party.gil += num;
            }
        }
        if (flag)
        {
            FF9Sfx.FF9SFX_StopLoop(109);
            this.currentState = BattleResultUI.ResultState.End;
        }
    }
Example #2
0
 private void UpdateState()
 {
     if (this.expEndTick && this.apEndTick)
     {
         for (Int32 i = 0; i < 4; i++)
         {
             if (this.abilityLearned[i].Count != 0)
             {
                 return;
             }
         }
         FF9Sfx.FF9SFX_StopLoop(105);
         FF9Sfx.FF9SFX_Play(103);
         this.currentState = BattleResultUI.ResultState.EndEXPAndAP;
     }
 }
Example #3
0
    public override Boolean OnKeyConfirm(GameObject go)
    {
        if (base.OnKeyConfirm(go))
        {
            switch (this.currentState)
            {
            case BattleResultUI.ResultState.Start:
                FF9Sfx.FF9SFX_PlayLoop(105);
                this.currentState = BattleResultUI.ResultState.EXPAndAPTick;
                break;

            case BattleResultUI.ResultState.EXPAndAPTick:
            {
                FF9Sfx.FF9SFX_StopLoop(105);
                this.currentState = BattleResultUI.ResultState.EndEXPAndAP;
                BattleEndValue[] array = this.expValue;
                for (Int32 i = 0; i < (Int32)array.Length; i++)
                {
                    BattleEndValue battleEndValue = array[i];
                    battleEndValue.step = battleEndValue.value;
                }
                this.UpdateExp();
                BattleEndValue[] array2 = this.apValue;
                for (Int32 j = 0; j < (Int32)array2.Length; j++)
                {
                    BattleEndValue battleEndValue2 = array2[j];
                    battleEndValue2.step = battleEndValue2.value;
                }
                this.UpdateAp();
                this.DisplayEXPAndAPInfo();
                this.ApplyTweenAndFade();
                break;
            }

            case BattleResultUI.ResultState.EndEXPAndAP:
                this.ApplyTweenAndFade();
                break;

            case BattleResultUI.ResultState.StartGilAndItem:
                if (!this.UpdateItem())
                {
                    this.ItemOverflowPanelTween.TweenIn((Action)null);
                    this.currentState = BattleResultUI.ResultState.ItemFullDialog;
                }
                else if (this.gilValue.value == 0u)
                {
                    this.currentState = BattleResultUI.ResultState.End;
                }
                else
                {
                    FF9Sfx.FF9SFX_PlayLoop(109);
                    this.currentState = BattleResultUI.ResultState.GilTick;
                }
                break;

            case BattleResultUI.ResultState.ItemFullDialog:
                this.ItemOverflowPanelTween.TweenOut(delegate
                {
                    if (this.gilValue.value == 0u)
                    {
                        this.currentState = BattleResultUI.ResultState.End;
                    }
                    else
                    {
                        FF9Sfx.FF9SFX_PlayLoop(109);
                        this.currentState = BattleResultUI.ResultState.GilTick;
                    }
                });
                break;

            case BattleResultUI.ResultState.GilTick:
                this.currentState  = BattleResultUI.ResultState.End;
                this.gilValue.step = this.gilValue.value;
                FF9Sfx.FF9SFX_StopLoop(109);
                this.UpdateGil();
                this.DisplayGilAndItemInfo();
                break;

            case BattleResultUI.ResultState.End:
                this.currentState = BattleResultUI.ResultState.Hide;
                this.Hide((UIScene.SceneVoidDelegate)null);
                break;
            }
        }
        return(true);
    }