public ExplosionSprite(string resourcePath, string soundFxPath, int width, int height, SpriteLoaderFlyweight textureFlyweight) : base(resourcePath, width, height, textureFlyweight) { _once = true; _soundFxPath = soundFxPath; _hasTransparency = true; }
public MissileSprite(Position initialPosition, Color missileColor, string resourcePath, int width, int height, SpriteLoaderFlyweight textureFlyweight) : base(resourcePath, width, height, textureFlyweight) { MissileColor = missileColor; _initialPosition = GameViewFramework.TranslateModelToViewPosition(initialPosition); _missileTrailWidth = 1; }
public TurretSprite(string resourcePath, string fontPath, int width, int height, SpriteLoaderFlyweight textureFlyweight) : base(resourcePath,width,height, textureFlyweight) { _fontPath = fontPath; _text = "0"; _hasTransparency = true; }
public MissileSprite(Position initialPosition, string resourcePath, int width, int height, SpriteLoaderFlyweight textureFlyweight) : base(resourcePath, width, height, textureFlyweight) { _initialPosition = GameViewFramework.TranslateModelToViewPosition(initialPosition); MissileColor = Color.LawnGreen; _missileTrailWidth = 1; _hasTransparency = false; }
public SimpleSprite(string resourcePath, int width, int height, SpriteLoaderFlyweight textureFlyweight) { _textureFlyweight = textureFlyweight; _resourcePath = resourcePath; _center = new Position(0, 0); _height = height; _width = width; _isAlive = true; }
public LevelMenu(SpriteLoaderFlyweight textureLoader, ViewSpriteFactory spriteFactory, string scoreFont) { _isShown = false; //number of milliseconds for which to show the menu; this will almost certainly go away... _showtime_ms = 5000; _scoreFont = scoreFont; _viewSpriteFactory = spriteFactory; _textureLoader = textureLoader; _waitHandle = new AutoResetEvent(false); }
public MainMenu(SpriteLoaderFlyweight textureLoader, string bannerFontPath, string buttonFontPath, string texturePath) { _isShown = false; _texturePath = texturePath; _bannerFontPath = bannerFontPath; _buttonFontPath = buttonFontPath; _textureLoader = textureLoader; _clickReceived = false; //These are just to define active regions, for receiving input int buttonWidth = GameParameters.MAX_X / 7; int buttonHeight = GameParameters.MAX_Y / 15; _playButton = new Rectangle(GameParameters.MAX_X / 20, (GameParameters.MAX_Y * 7) / 10 ,buttonWidth,buttonHeight); _quitButton = new Rectangle((GameParameters.MAX_X / 20) + GameParameters.MAX_X / 2, (GameParameters.MAX_Y * 7) / 10, buttonWidth, buttonHeight); }
public Reticle(bool eyeMode, string resourcePath, SpriteLoaderFlyweight textureFlyweight) { if(eyeMode) { _mouse = new EyeDevice(EYE_DEVICE_HZ); } else { _mouse = new MouseDevice(); } _resourcePath = resourcePath; _textureLoader = textureFlyweight; _width = 30; _height = 30; }
public GameOverMenu(SpriteLoaderFlyweight textureLoader, ViewSpriteFactory spriteFactory, string bannerFontPath, string buttonFontPath) { _spriteFactory = spriteFactory; _explosionSprites = new List<ExplosionSprite>(); _elapsed_ms = 0; _shown = false; _runningAnimation = true; _getUserInfo = false; _textureLoader = textureLoader; _spriteFactory = spriteFactory; _bannerFontPath = bannerFontPath; _buttonFontPath = buttonFontPath; _waitHandle = new AutoResetEvent(true); _retry = false; _initializeAnimation(); }