private void promotion_fade_in_initialize()
        {
            initialize_battle_sprites();
            Battler_1_Sprite.loc   = new Vector2(Battler_1_Loc.X, 176);
            Battler_1_Sprite.scale = Vector2.One;
            Battler_1_Sprite.reset_pose();
            Battler_1_Sprite.update_animation_position();
            Battler_1_Sprite.visible = true;

            HUD = null;
            if (!WaitingOnPromotionChoice)
            {
                // HUD
                setup_hud();
                HUD.complete_move();
            }
            // Create platforms
            create_platforms();
            Platform.add_y(-110);
            // White screen flash
            White_Screen           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
            White_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            White_Screen.visible   = false;

            // Start offscreen on the right if the promotion choice menu
            if (WaitingOnPromotionChoice)
            {
                Pan_Vector = new Vector2(this.OffscreenOffset, 0);
            }

            Black_Fill           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
            Black_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            Black_Fill.tint      = new Color(0, 0, 0, 0);
            // Create background
            if (is_battle_bg_visible)
            {
                Background = new Sprite(background(this.background_battler));
                Background.stereoscopic = Config.BATTLE_BG_DEPTH;
                Black_Backing           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                Black_Backing.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                Black_Backing.tint      = new Color(0, 0, 0, 255);
            }

            Skip_Fill           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
            Skip_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
        }
Example #2
0
        protected virtual void update_phase_0()
        {
            bool cont = false;

            while (!cont)
            {
                cont = true;
                switch (Timer)
                {
                case 0:
                    initialize_battle_sprites();
                    Timer++;
                    break;

                case 1:
                    Platform_Effect_1        = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Platform_Effect_1.offset = new Vector2(8, 8);
                    if (Battler_2 != null && Distance > 1)
                    {
                        Platform_Effect_2        = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                        Platform_Effect_2.offset = new Vector2(8, 8);
                    }
                    battle_sprite_setup(0);
                    Timer++;
                    break;

                case 2:
                case 3:
                    Battler_1_Sprite.visible = false;
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.visible = false;
                    }
                    battle_sprite_setup(Timer - 3);
                    Timer++;
                    break;

                case 4:
                    Battler_1_Sprite.visible  = true;
                    Battler_1_Sprite.offset.Y = 120;
                    Battler_1_Sprite.update_animation_position();
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.visible  = true;
                        Battler_2_Sprite.offset.Y = 120;
                        Battler_2_Sprite.update_animation_position();
                    }
                    battle_sprite_setup(Timer - 3);
                    Timer++;
                    break;

                case 5:
                    battle_sprite_setup(Timer - 3);
                    Timer++;
                    break;

                case 6:
                    battle_sprite_setup(Timer - 3);
                    // HUD
                    setup_hud();
                    // Create platforms
                    create_platforms();
                    // White screen flash
                    White_Screen           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    White_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    White_Screen.visible   = false;
                    Timer++;
                    break;

                case 7:
                case 8:
                    battle_sprite_setup(Timer - 3);
                    // 110 total platform movement
                    Platform.add_y(-(Timer + 3));
                    Timer++;
                    break;

                case 9:
                case 10:
                case 11:
                    battle_sprite_setup(Timer - 3);
                    Platform.add_y(-(Timer + 6));
                    Timer++;
                    break;

                case 12:
                case 13:
                    battle_sprite_setup(Timer - 3);
                    Platform.add_y(-(Timer + 8));
                    Timer++;
                    break;

                case 14:
                    battle_sprite_setup(Timer - 3);
                    Timer++;
                    Platform_Effect_1 = null;
                    Platform_Effect_2 = null;
                    break;

                case 15:
                    Battler_1_Sprite.loc   = new Vector2(Battler_1_Loc.X, 176);
                    Battler_1_Sprite.scale = Vector2.One;
                    Battler_1_Sprite.reset_pose();
                    Battler_1_Sprite.update_animation_position();
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.loc   = new Vector2(Battler_2_Loc.X, 176);
                        Battler_2_Sprite.scale = Vector2.One;
                        Battler_2_Sprite.reset_pose();
                        Battler_2_Sprite.update_animation_position();
                    }
                    Battler_1_Sprite.initialize_animation();
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.initialize_animation();
                    }

                    Platform_Effect_1 = null;
                    Platform_Effect_2 = null;
                    Timer++;
                    break;

                case 16:
                    Black_Fill           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Black_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, 32);
                    }
                    else
                    {
                        Black_Fill.tint = new Color(0, 0, 0, 0);
                    }
                    Timer++;
                    break;

                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, (int)MathHelper.Min((Timer - 15) * 32, 255));
                        if (Timer > 19)
                        {
                            Weather_Opacity = (Timer - 19) / 16f;
                        }
                    }
                    Timer++;
                    break;

                case 24:
                case 25:
                    if (is_battle_bg_visible)
                    {
                        Weather_Opacity = (Timer - 19) / 16f;
                    }
                    Timer++;
                    break;

                case 26:
                    // Create background
                    if (is_battle_bg_visible)
                    {
                        Background = new Sprite(background(this.background_battler));
                        Background.stereoscopic = Config.BATTLE_BG_DEPTH;
                        Black_Backing           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                        Black_Backing.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                        Black_Backing.tint      = new Color(0, 0, 0, 255);

                        Weather_Opacity = (Timer - 19) / 16f;
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                    if (is_battle_bg_visible)
                    {
                        Black_Fill.tint = new Color(0, 0, 0, (int)MathHelper.Min((35 - Timer) * 32, 255));
                        Weather_Opacity = (Timer - 19) / 16f;
                        //Weather_Opacity = (Timer - 27) / 8f;
                    }
                    else
                    {
                        cont = false;
                    }
                    Timer++;
                    break;

                case 36:
                    battle_start_text();
                    if (!Music_Started && (!test_battle_theme() || !Global.game_temp.boss_theme))
                    {
                        Global.Audio.BgmFadeOut(60);
                    }
                    Global.game_temp.boss_theme = false;
                    Timer++;
                    break;

                case 72:
                    if (!Music_Started)
                    {
                        play_battle_theme();
                        Music_Started = true;
                    }
                    Battler_1_Sprite.start_battle();
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.start_battle();
                    }
                    Timer++;
                    break;

                case 73:
                    if (Battler_1_Sprite.duration <= 2 && (Battler_2_Sprite == null || Battler_2_Sprite.duration <= 2))
                    {
                        check_talk(Battler_1, Battler_2, Reverse);
                        Timer++;
                    }
                    break;

                case 74:
                    if (!is_message_window_active && HUD.is_ready && !Message_Active)
                    {
                        Timer = 0;
                        Phase = 1;
                    }
                    break;

                default:
                    Timer++;
                    break;
                }
            }
        }
Example #3
0
        protected override void update_phase_0()
        {
            bool cont = false;

            while (!cont)
            {
                cont = true;
                switch (Timer)
                {
                // Initialize battler sprites
                case 0:
                    initialize_battle_sprites();
                    Battler_1_Sprite.loc   = new Vector2(Battler_1_Loc.X, 176);
                    Battler_1_Sprite.scale = Vector2.One;
                    Battler_1_Sprite.reset_pose();
                    Battler_1_Sprite.visible = true;
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.loc   = new Vector2(Battler_2_Loc.X, 176);
                        Battler_2_Sprite.scale = Vector2.One;
                        Battler_2_Sprite.reset_pose();
                        Battler_2_Sprite.visible = true;
                    }
                    Skip_Fill           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Skip_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    Skip_Fill.tint      = new Color(0, 0, 0, 255);
                    Timer++;
                    break;

                case 1:
                case 2:
                case 3:
                    Timer++;
                    break;

                case 4:
                    Timer++;
                    break;

                case 5:
                    Timer++;
                    break;

                case 6:
                    // hud
                    setup_hud();
                    while (!HUD.is_ready)
                    {
                        HUD.update();
                    }
                    // Create platforms
                    create_platforms();
                    // White screen flash
                    White_Screen           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    White_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    White_Screen.visible   = false;
                    // Create background
                    Background              = new Arena_Background(background(this.background_battler));
                    Black_Backing           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Black_Backing.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    Black_Backing.tint      = new Color(0, 0, 0, 255);
                    Timer++;
                    break;

                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                    Skip_Fill.tint = new Color(0, 0, 0, (23 - Timer) * 16);
                    Timer++;
                    break;

                case 24:
                    Skip_Fill            = null;
                    Black_Fill           = new Sprite(battle_content.Load <Texture2D>(@"Graphics/White_Square"));
                    Black_Fill.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
                    Black_Fill.tint      = new Color(0, 0, 0, 0);
                    if (Combat_Data != null)
                    {
                        Battler_1_Sprite.initialize_animation();
                        if (Battler_2_Sprite != null)
                        {
                            Battler_2_Sprite.initialize_animation();
                        }
                    }
                    Timer++;
                    break;

                case 36:
                    Global.Audio.BgmFadeOut(60);
                    crowd_cheer();
                    battle_start_text();
                    Timer++;
                    break;

                case 72:
                    play_battle_theme();
                    Battler_1_Sprite.start_battle();
                    if (Battler_2_Sprite != null)
                    {
                        Battler_2_Sprite.start_battle();
                    }
                    Timer++;
                    break;

                case 73:
                    if (Battler_1_Sprite.duration <= 2 && (Battler_2_Sprite == null || Battler_2_Sprite.duration <= 2))
                    {
                        check_talk(Battler_1, Battler_2, Reverse);
                        Timer++;
                    }
                    break;

                case 74:
                    if (!is_message_window_active && HUD.is_ready && !Message_Active)
                    {
                        Timer = 0;
                        Phase = 1;
                    }
                    break;

                default:
                    Timer++;
                    break;
                }
            }
        }