/// <summary>
        /// Initializes static members of the <see cref="Plasma"/> class.
        /// </summary>
        /// <remarks>
        /// Using the static constructor guarantees that the static state is initialized right before the class is used. Without it, the static state
        /// could be initialized too early, e.g. when the content has not been loaded yet.
        /// </remarks>
        static Plasma()
        {
            //Populate the bullet info
            var bulletImg = Tools.Content.Load <Texture2D>("Images/Sprites/Bullets/Plasma");

            Info = new BulletTypeInfo(bulletImg, DAMAGE);
        }
        /// <summary>
        /// Initializes static members of the <see cref="MediumBullet"/> class.
        /// </summary>
        /// <remarks>
        /// Using the static constructor guarantees that the static state is initialized right before the class is used. Without it, the static state
        /// could be initialized too early, e.g. when the content has not been loaded yet.
        /// </remarks>
        static MediumBullet()
        {
            //populates the bullet info
            var bulletImg = Tools.Content.Load <Texture2D>("Images/Sprites/Bullets/Medium_Shell");

            Info = new BulletTypeInfo(bulletImg, DAMAGE);
        }
Пример #3
0
        /// <summary>
        /// Initializes static members of the <see cref="Laser"/> class.
        /// </summary>
        /// <remarks>
        /// Using the static constructor guarantees that the static state is initialized right before the class is used. Without it, the static state
        /// could be initialized too early, e.g. when the content has not been loaded yet.
        /// </remarks>
        static Laser()
        {
            //populate the bullet info
            var bulletImg = Tools.Content.Load <Texture2D>("Images/Sprites/Bullets/Laser");

            Info = new BulletTypeInfo(bulletImg, DAMAGE);
        }