Пример #1
0
        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"));
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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;
        }