MyGame.BillboardSystem.BillboardSystem C# (CSharp) Method

BillboardSystem() public method

Constructor that initialize the billboard attributes
public BillboardSystem ( Game game, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 billboardSize, Vector3 particlePositions ) : System
game Game Instance of MyGame this drawable game component is attached to
texture Microsoft.Xna.Framework.Graphics.Texture2D The Texture2D(2D picture) that is drawn at every position
billboardSize Vector2 Size of billboard
particlePositions Vector3 Positions of the billboards
return System
        public BillboardSystem(Game game, Texture2D texture,
            Vector2 billboardSize, Vector3[] particlePositions)
            : base(game)
        {
            this.nBillboards = particlePositions.Length;
            this.billboardSize = billboardSize;
            this.texture = texture;

            effect = Game.Content.Load<Effect>("BillboardEffect");

            generateParticles(particlePositions);
        }