private void ShootFireball(GameScreen screen) { if (isFiring) { sprite.PlayAnimation(runAnimation); Fireball f = new Fireball(screen, Level, "enemyfire"); //f.loadContent(); if ((int)direction == 1) { f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25), new Vector2(200, 200), new Vector2(1, 0), "enemyfire"); } else { f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25), new Vector2(200, 200), new Vector2(-1, 0), "enemyfire"); } mFireballs.Add(f); } }
private void ShootFireball(GameScreen screen) { if (isFiring && (numFireBalls > 0)) { sprite.PlayAnimation(fireAnimation); Fireball f = new Fireball(screen, Level, ""); //f.loadContent(); if (flip == SpriteEffects.FlipHorizontally) { f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25), new Vector2(200, 200), new Vector2(1, 0), ""); } else { f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25), new Vector2(200, 200), new Vector2(-1, 0), ""); } mFireballs.Add(f); numFireBalls--; } }
private void ShootFireball(GameScreen screen) { if (isFiring) { sprite.PlayAnimation(runAnimation); Fireball f = new Fireball(screen, Level, "enemyfire"); //f.loadContent(); if ((int)direction == 1) f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25), new Vector2(200, 200), new Vector2(1, 0), "enemyfire"); else f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25), new Vector2(200, 200), new Vector2(-1, 0), "enemyfire"); mFireballs.Add(f); } }
private void ShootFireball(GameScreen screen) { if (isFiring && (numFireBalls > 0)) { sprite.PlayAnimation(fireAnimation); Fireball f = new Fireball(screen,Level, ""); //f.loadContent(); if (flip == SpriteEffects.FlipHorizontally) f.Fire(screen, new Vector2(Position.X + 10, Position.Y - 25), new Vector2(200, 200), new Vector2(1, 0), ""); else f.Fire(screen, new Vector2(Position.X - 25, Position.Y - 25), new Vector2(200, 200), new Vector2(-1, 0), ""); mFireballs.Add(f); numFireBalls--; } }