protected void update_animation() { switch (Action) { // Load battler, fade in screen case 0: switch (Timer) { case 0: set_stats(); Message.set_text("" + class_data.Description); Timer++; Black_Bar_Timer = 1; Black_Bar1.visible = true; Black_Bar2.visible = true; Black_Screen.visible = false; break; case 51: Timer = 0; Action++; break; default: Timer++; break; } break; // Starts attacks case 1: if (Battler_Action == Class_Reel_Battler_Actions.Idle) { if (Attack_Count > 0) { Attack_Count--; Battler.attack(false, class_data.Distance); Battler_Action = Class_Reel_Battler_Actions.Start_Attack; } else { change_phase(Class_Reel_Phases.Closing); } } break; } }
private void change_phase(Class_Reel_Phases phase) { Timer = 0; Action = 0; switch (phase) { case Class_Reel_Phases.Animation: White_Screen.opacity = 0; if (Battler == null) { create_battler(); } Burst = null; Title_Back = null; Letters.Clear(); Class_Banner.opacity = 0; Class_Banner.visible = false; break; case Class_Reel_Phases.Class_Name: Battler = null; Battler_Action = Class_Reel_Battler_Actions.Idle; Battler_Timer = 0; Message = null; Black_Screen.visible = true; Black_Bar1.visible = false; Black_Bar2.visible = false; Black_Bar_Timer = -1; if (Phase == Class_Reel_Phases.Force_Close) { increment_index(); Timer = 10; } break; case Class_Reel_Phases.Closing: case Class_Reel_Phases.Force_Close: Action = 0; break; } Phase = phase; }
private void update_battler_animation() { switch (Battler_Action) { // Starts attack case Class_Reel_Battler_Actions.Start_Attack: switch (Battler_Timer) { // Wait for attack case 0: if (Battler.duration <= 1) { Battler.hit_freeze(false, class_data.Distance); if (Unit.spell_animation()) { Data_Weapon weapon = Unit.actor.weapon; if (weapon.has_anima_start()) { Battler.anima_start(1); Battler_Timer = 1; } else { Battler.attack_spell(true, false, class_data.Distance); Battler_Timer = 2; } } else { Battler_Timer = 2; } } break; // Wait for anima startup case 1: if (Battler.anima_ready) { Battler.attack_spell(true, false, class_data.Distance); Battler_Timer = 2; } break; // Wait for hit case 2: if (Unit.spell_animation() ? Battler.spell_ready : Battler.duration <= 1) { if (Unit.spell_animation()) { Battler.end_spell(true, false, 1); } Battler_Timer = 0; Battler_Action = Class_Reel_Battler_Actions.End_Attack; } break; } break; // Ends attack case Class_Reel_Battler_Actions.End_Attack: if (Battler_Timer >= class_data.Wait_Time[0] + 30) { if (Battler.spell_ready) { Battler.return_anim(false, class_data.Distance); Battler_Timer = 0; Battler_Action = Class_Reel_Battler_Actions.Wait_For_Return; } } else { Battler_Timer++; } break; // Waits for return case Class_Reel_Battler_Actions.Wait_For_Return: if (Battler.duration <= 4) { Battler_Action = Class_Reel_Battler_Actions.Next_Attack; } break; // Next attack case Class_Reel_Battler_Actions.Next_Attack: if (Battler_Timer >= class_data.Wait_Time[1]) { Battler_Timer = 0; Battler_Action = Class_Reel_Battler_Actions.Idle; } else { Battler_Timer++; } break; } }