Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
 public DestructableSprite(Texture2D textureImage, Vector2 position, Point frameSize, int collisionOffset, Point currentFrame,
     Point sheetSize, Vector2 speed, int millisecondsPerFrame, bool canPassThru, Game1.Power vunerableTo)
     : base(textureImage, position, frameSize, collisionOffset, currentFrame, sheetSize, speed, millisecondsPerFrame)
 {
     this.canPassThru = canPassThru;
     this.vunerableTo = vunerableTo;
 }
Exemplo n.º 3
0
        public ProjectileSprite(Texture2D textureImage, Vector2 position, Point frameSize, int collisionOffset,
            Point currentFrame, Point sheetSize, Vector2 speed, Vector2 direction, Game1.Power projType)
            : base(textureImage, position, frameSize, collisionOffset,
                currentFrame, sheetSize, speed)
        {
            this._texture = textureImage;
            //direction is passed in as a positive or negative X amount so we know if the
            // projectile is moving left or right
            this.drction = direction;
            this.projType = projType;
            timeAlive = 0;
            alive = true;
            frameOffset = 0;
            if (projType == Game1.Power.Fire)
                powerOffset = 0;
            if (projType == Game1.Power.Ice)
                powerOffset = 2;
            if (projType == Game1.Power.Wind)
                powerOffset = 4;
            if (projType == Game1.Power.Shock)
                powerOffset = 6;

            if (direction.X < 0) //we are going left, need to add one to the powerOffset
                powerOffset++;
        }