public FireObject(Vector2 initialPosition, int speedMilisecond, int moveLenght) : base(ImagePath, initialPosition, speedMilisecond, moveLenght) { var animation = new SpriteSheetEffect(new Vector2(5, 1), 100); Image.ActivateEffect(animation); Type = GameObjectType.Fire; SetRelativeBoundingBox(100, 560); }
public Player(GameManager gameManager) { _gameManager = gameManager; var initialPosition = new Vector2(300, 350); _playerImage = new ImageFile { ImagePath = @"Images\Player", Position = initialPosition, }; _animationEffect = new SpriteSheetEffect(new Vector2(4, 2), 100); _rotateImageEffect = new RotateImageEffect(180, 100) { IsActive = false }; _playerImage.ActivateEffect(_animationEffect); _playerImage.ActivateEffect(_rotateImageEffect); _playerDieSound = new SoundFile(gameManager.SoundManager, @"Effects\Crash"); _changePlayerSound = new SoundFile(gameManager.SoundManager, @"Effects\Change"); _wingFlappingSound = new SoundFile(gameManager.SoundManager, @"Effects\WingFlapping"); _currentType = gameManager.PlayerStats.CurrentPlayerType; }