Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new instance of a Deer Tick enemy ship
        /// </summary>
        /// <param name="content">A ContentManager to load resources with</param>
        /// <param name="position">The position of the Deer Tick ship in the game world</param>
        public DeerTick(uint id, ContentManager content, Vector2 position, DeerTickDirection dir)
            : base(id)
        {
            this.position = position;

            spritesheet = content.Load<Texture2D>("Spritesheets/newsh2.shp.000000");

            spriteBounds[(int)DeerTickDirection.Straight].X = 0;
            spriteBounds[(int)DeerTickDirection.Straight].Y = 196;
            spriteBounds[(int)DeerTickDirection.Straight].Width = 24;
            spriteBounds[(int)DeerTickDirection.Straight].Height = 28;

            spriteBounds[(int)DeerTickDirection.Right].X = 24;
            spriteBounds[(int)DeerTickDirection.Right].Y = 196;
            spriteBounds[(int)DeerTickDirection.Right].Width = 24;
            spriteBounds[(int)DeerTickDirection.Right].Height = 28;

            spriteBounds[(int)DeerTickDirection.Left].X = 48;
            spriteBounds[(int)DeerTickDirection.Left].Y = 196;
            spriteBounds[(int)DeerTickDirection.Left].Width = 24;
            spriteBounds[(int)DeerTickDirection.Left].Height = 28;

            direction = dir;
            shotTimer = DT_SHOT_DELAY; //reset the bullet timer
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of a Deer Tick enemy ship
        /// </summary>
        /// <param name="content">A ContentManager to load resources with</param>
        /// <param name="position">The position of the Deer Tick ship in the game world</param>
        public DeerTick(uint id, ContentManager content, Vector2 position, DeerTickDirection dir)
            : base(id)
        {
            this.position = position;

            spritesheet = content.Load <Texture2D>("Spritesheets/newsh2.shp.000000");

            spriteBounds[(int)DeerTickDirection.Straight].X      = 0;
            spriteBounds[(int)DeerTickDirection.Straight].Y      = 196;
            spriteBounds[(int)DeerTickDirection.Straight].Width  = 24;
            spriteBounds[(int)DeerTickDirection.Straight].Height = 28;

            spriteBounds[(int)DeerTickDirection.Right].X      = 24;
            spriteBounds[(int)DeerTickDirection.Right].Y      = 196;
            spriteBounds[(int)DeerTickDirection.Right].Width  = 24;
            spriteBounds[(int)DeerTickDirection.Right].Height = 28;

            spriteBounds[(int)DeerTickDirection.Left].X      = 48;
            spriteBounds[(int)DeerTickDirection.Left].Y      = 196;
            spriteBounds[(int)DeerTickDirection.Left].Width  = 24;
            spriteBounds[(int)DeerTickDirection.Left].Height = 28;

            direction = dir;
            shotTimer = DT_SHOT_DELAY; //reset the bullet timer
        }