Exemplo n.º 1
0
        private void update_wbreak()
        {
            if (WBreak_Calling)
            {
                WBreaking      = true;
                WBreak_Calling = false;
            }
            if (WBreaking)
            {
                bool cont = false;
                while (!cont)
                {
                    switch (WBreak_Action)
                    {
                    case 0:
                        switch (WBreak_Timer)
                        {
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                            WBreak_Timer++;
                            break;

                        case 18:
                            Global.game_system.play_se(System_Sounds.Loss);
                            create_wbreak_popup();
                            WBreak_Action = 1;
                            WBreak_Timer  = 0;
                            break;
                        }
                        break;

                    case 1:
                        if (WBreak_Popup == null)
                        {
                            WBreak_Action = 2;
                        }
                        break;

                    case 2:
                        WBreaking     = false;
                        WBreak_Action = 0;
                        WBreak_Timer  = 0;
                        WBreak_Item   = new int[0];
                        break;
                    }
                    cont = true;
                }
                if (WBreak_Popup != null)
                {
                    WBreak_Popup.update();
                    if (WBreak_Popup.finished)
                    {
                        WBreak_Popup = null;
                    }
                }
            }
        }
Exemplo n.º 2
0
 protected virtual void create_wbreak_popup()
 {
     WBreak_Popup     = new Item_Break_Popup(WBreak_Item[1], WBreak_Item[0] == 1, false);
     WBreak_Popup.loc = new Vector2(96, 80);
 }
Exemplo n.º 3
0
        private void update_wlvl()
        {
            if (WLvl_Calling)
            {
                WLvling_Up   = true;
                WLvl_Calling = false;
            }
            if (WLvling_Up)
            {
                bool cont = false;
                while (!cont)
                {
                    switch (WLvl_Action)
                    {
                    case 0:
                        switch (WLvl_Timer)
                        {
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                            WLvl_Timer++;
                            break;

                        case 18:
                            Global.game_system.play_se(System_Sounds.Gain);
                            int type_index = Global.game_map.units[WLvl_Battler_Id].actor.wlvl_up_type();
                            var type       = Global.weapon_types[type_index];
                            int rank       = Global.game_map.units[WLvl_Battler_Id].actor.get_weapon_level(type);
                            create_wlvl_popup(type_index, rank);
                            WLvl_Action = 1;
                            WLvl_Timer  = 0;
                            break;
                        }
                        break;

                    case 1:
                        if (WLvl_Popup == null)
                        {
                            WLvl_Action = 2;
                        }
                        break;

                    case 2:
                        WLvling_Up  = false;
                        WLvl_Action = 0;
                        WLvl_Timer  = 0;
                        Global.game_map.units[WLvl_Battler_Id].actor.clear_wlvl_up();
                        WLvl_Battler_Id = -1;
                        break;
                    }
                    cont = true;
                }
                if (WLvl_Popup != null)
                {
                    WLvl_Popup.update();
                    if (WLvl_Popup.finished)
                    {
                        WLvl_Popup = null;
                    }
                }
            }
        }
Exemplo n.º 4
0
 protected virtual void create_wlvl_popup(int weapon, int newRank)
 {
     WLvl_Popup     = new Weapon_Level_Popup(weapon, newRank, false);
     WLvl_Popup.loc = new Vector2((Config.WINDOW_WIDTH - WLvl_Popup.Width) / 2, 80);
 }
Exemplo n.º 5
0
        private void update_skill_gain()
        {
            if (is_leveling_up())
            {
                return;
            }
            if (SkillGainCalling)
            {
                SkillGaining     = true;
                SkillGainCalling = false;
            }
            if (SkillGaining)
            {
                bool cont = false;
                while (!cont)
                {
                    switch (SkillGainAction)
                    {
                    case 0:
                        switch (SkillGainTimer)
                        {
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                            SkillGainTimer++;
                            break;

                        case 18:
                            Global.game_system.play_se(System_Sounds.Gain);
                            create_skill_gain_popup(GainedSkills);
                            SkillGainAction = 1;
                            SkillGainTimer  = 0;
                            break;
                        }
                        break;

                    case 1:
                        if (SkillGainPopup == null)
                        {
                            SkillGainAction = 2;
                        }
                        break;

                    case 2:
                        SkillGaining    = false;
                        SkillGainAction = 0;
                        SkillGainTimer  = 0;
                        GainedSkills.Clear();
                        break;
                    }
                    cont = true;
                }
                if (SkillGainPopup != null)
                {
                    SkillGainPopup.update();
                    if (SkillGainPopup.finished)
                    {
                        SkillGainPopup = null;
                    }
                }
            }
        }
Exemplo n.º 6
0
 protected virtual void create_skill_gain_popup(List <int> skill_ids)
 {
     SkillGainPopup     = new Skill_Gain_Popup(skill_ids, false);
     SkillGainPopup.loc = new Vector2((Config.WINDOW_WIDTH - SkillGainPopup.Width) / 2, 80);
 }