public Gun(ContentManager content, string textureName, string arrowTextureName, Point startLoc, Size spaceshipSize, int speed, int winHeight, int winWidth) : base(content, textureName, startLoc, speed, winHeight, winWidth) { this.content = content; this.arrowTextureName = arrowTextureName; this.ArrowList = new List <Arrow>(); orignalLocation = new Point(location.X, location.Y); SpaceshipSize = spaceshipSize; fpsTimer = new FpsTimer(30); fpsTimer.TheFunctionToRun = ShootingAnimation; fpsTimer.StartTimer(); gunShotSound = new MasterSound(content, Sounds.GUN_SHOT); }
public SpriteAnimation(ContentManager _content, string _textureName, Rectangle _locAndSize, int _frameWaiteTime, int _frameWidth, int _frameHeight, int _rows, int _culloms, int _rotation) { frameWidth = _frameWidth; frameHeight = _frameHeight; rows = _rows; culloms = _culloms; rotation = _rotation; texture = _content.Load <Texture2D>(_textureName); sourceRectangle = new Rectangle(0, 0, frameWidth, frameHeight); SizeAndLocationRect = _locAndSize; animationIsOver = false; fpsTimer = new FpsTimer(_frameWaiteTime); fpsTimer.TheFunctionToRun = animationProgress; fpsTimer.StartTimer(); }
public void StartMovment() { fpsTimer.StartTimer(); }