Example #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            anim        = Content.Load <GifAnimation.GifAnimation>("anim1");

            // TODO: use this.Content to load your game content here
        }
Example #2
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     base.LoadContent();
     anim1 = Content.Load<GifAnimation.GifAnimation>("chip4");
     anim2 = Content.Load<GifAnimation.GifAnimation>("mob1");
     TPEngine.Get().State.PushState(new TDBaseState(), true);
 }
Example #3
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     base.LoadContent();
     anim1 = Content.Load <GifAnimation.GifAnimation>("chip4");
     anim2 = Content.Load <GifAnimation.GifAnimation>("mob1");
     TPEngine.Get().State.PushState(new TDBaseState(), true);
 }
Example #4
0
 public static void Create(SpriteBatch spriteBatch)
 {
     if (animated)
     {
         switch (whichUnit)
         {
             case 0:
                 animation = droneWorker;
                 break;
             case 1:
                 animation = eye;
                 break;
             case 2:
                 animation = tank;
                 break;
         }
         spriteBatch.Draw(animation.GetTexture(), position, Color.White);
     }
     else
     {
         switch (whichUnit)
         {
             case 0:
                 unitBackground = cementary;
                 break;
             case 1:
                 unitBackground = palace;
                 break;
             case 2:
                 unitBackground = obserwatorium;
                 break;
             default:
                 unitBackground = defaultBackground;
                 break;
         }
         spriteBatch.Draw(unitBackground, position, Color.White);
     }
 }
Example #5
0
 public static void Initialize(ContentManager content)
 {
     width = 150;
     height = 150;
     position = new Rectangle(0, GUI.screenHeight, width, height);
     defaultBackground = content.Load<Texture2D>("GUI/tlo");
     droneWorker = content.Load<GifAnimation.GifAnimation>("GUI/units/Drone_Worker");
     tank = content.Load<GifAnimation.GifAnimation>("GUI/units/czolg");
     eye = content.Load<GifAnimation.GifAnimation>("GUI/units/Oko");
     cementary = content.Load<Texture2D>("GUI/buildings/cementary");
     palace = content.Load<Texture2D>("GUI/buildings/palac");
     obserwatorium = content.Load<Texture2D>("GUI/buildings/obserwatorium");
     animation = tank;
     isUp = true;
     upTime = 1.0f;
     downTime = 1.0f;
     animated = false;
     whichUnit = int.MaxValue;
 }