public RedBalloon(Vector2 position) : base(position, new Vector2(0, kSpeedRedBalloon)) { //Initialize the textures... var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("ballon")); DyingTexturesList.Add(resMgr.GetTexture("ballon_dead")); }
public BullsEye(Vector2 position) : base(position, kSpeed, 0) { //Initialize the textures... var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("bulls_eye")); _arrowTexture = ResourcesManager.Instance.GetTexture("arrow"); _arrowHitPoints = new List <float>(); }
public Butterfly(Vector2 position) : base(position, Vector2.Zero, 0) { //Initialize the textures... var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("butterfly_bubled")); DyingTexturesList.Add(resMgr.GetTexture("butterfly")); //Init the Speed... int ySpeed = GameManager.Instance.RandomNumGen.Next(kSpeedMin, kSpeedMax); Speed = new Vector2(0, -ySpeed); }
public YellowBalloon(Vector2 position) : base(position, Vector2.Zero) { //Initialize the textures... var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("ballon_yellow")); DyingTexturesList.Add(resMgr.GetTexture("ballon_yellow_dead")); //Init the Speed... int ySpeed = GameManager.Instance.RandomNumGen.Next(kSpeedMinYellonBalloon, kSpeedMaxYellowBalloon); Speed = new Vector2(0, -ySpeed); }
public Slime(Vector2 position) : base(position, Vector2.Zero, 0) { //Initialize the textures... var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("slime")); DyingTexturesList.Add(resMgr.GetTexture("slime_dead")); //Init the Speed... int xSpeed = GameManager.Instance.RandomNumGen.Next(kSpeedMin, kSpeedMax); Speed = new Vector2(-xSpeed, 0); //Init the timers... _dyingClock = new Clock(kTimeToDieMs, 1); _dyingClock.OnTick += OnDyingClockTick; }
public Paper(string contents) : base(Vector2.Zero, Vector2.Zero, 0) { //Init the iVars. _contents = contents; //Init the Textures. var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("paper")); //Init the Sprite Fonts. _spriteFont = resMgr.GetFont("arial"); var lvl = GameManager.Instance.CurrentLevel; var x = lvl.PlayField.Center.X - BoundingBox.Center.X; var y = lvl.PlayField.Center.Y - BoundingBox.Center.Y; Position = new Vector2(x, y); }
public Archer(Vector2 position) : base(position, Vector2.Zero, 0) { //Init the textures. var resMgr = ResourcesManager.Instance; AliveTexturesList.Add(resMgr.GetTexture("hero_stand")); AliveTexturesList.Add(resMgr.GetTexture("hero_armed")); AliveTexturesList.Add(resMgr.GetTexture("hero_without_arrow")); DyingTexturesList = AliveTexturesList; //Init the Properties. ArrowsCount = kMaxArrowsCount; CurrentBowState = BowState.Stand; EnemyHits = 0; //Init the timers. _changeBowStateClock = new Clock(kChangeBowStateInterval, 1); _changeBowStateClock.OnTick += OnChangeStateClockTick; _hitGlowClock = new Clock(kHitGlowInterval, kHitGlowRepeatCount); _hitGlowClock.OnTick += OnHitGlowClockTick; }
public Arrow(Vector2 position) : base(position, new Vector2(kSpeed, 0), 0) { //Init the textures. AliveTexturesList.Add(ResourcesManager.Instance.GetTexture("arrow")); }