/// <summary> /// A method that sets captain's attack three animation /// </summary> /// <param name="currentBox">The current picture box</param> private async Task HeroAttackAnimation3Async(PictureBox currentBox) { GenerateFrames frames = new GenerateFrames(Properties.Resources.captain_cartoon_attack3); for (int index = 0; index < frames.GetLength(); index++) { currentBox.Image = frames.GetImages(index); await Task.Delay(60); } HeroIntoAnimation(currentBox); }
/// <summary> /// A method that sets thano's attack three animation /// </summary> /// <param name="currentBox">The current picture box</param> private async Task VillianAttackAnimation2Async(PictureBox currentBox) { GenerateFrames frames = new GenerateFrames(Properties.Resources.than_attack1); for (int index = 0; index < frames.GetLength(); index++) { currentBox.Image = frames.GetImages(index); await Task.Delay(60); } VillianIntoAnimation(currentBox); }