public Candle(GifAnimation inImage, int locX, int inID) { image = inImage; location.X = locX; location.Y = 390; location.Width = 32; location.Height = 64; id = inID; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> /// protected override void LoadContent() { gameFont = Content.Load <SpriteFont>(@"Fonts\GameFont"); x = new Candle(lgCandle, 0, 0); Camera.WorldRectangle = new Rectangle(0, 0, 2291, 480); Camera.ViewPortWidth = 1024; Camera.ViewPortHeight = 480; // Load the images background = Content.Load <Texture2D>(@"Images\Castlevaniast1"); background2 = Content.Load <Texture2D>(@"Images\stage2"); lgCandle = Content.Load <GifAnimation>(@"Images\LargeCandleGif"); // Add music to game. Song song = Content.Load <Song>(@"Music\music"); // Put the name of your song in instead of "song_title" MediaPlayer.Play(song); for (int i = 0; i < num_candles; i++) { candles.Add(new Candle(lgCandle, candleLocX[i], i + 1)); } // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // Medusa medusa = Content.Load <GifAnimation>(@"Images\MedusaR"); // Player trevor = Content.Load <Texture2D>(@"Images\trevorwalk"); // Weapon(s) dagger = Content.Load <Texture2D>(@"Images\daggerR"); // Skeleton skeleton = Content.Load <Texture2D>(@"Images\skeletons"); }
private void CreateGifAnimation(MemoryStream memoryStream) { try { _gifAnimation = new GifAnimation(); _gifAnimation.CreateGifAnimation(memoryStream); _gifAnimation.Stretch = Stretch; _gifAnimation.StretchDirection = StretchDirection; this.AddChild(_gifAnimation); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "CreateGifAnimation()--1", "Controls\\VMuktiGrid\\ImageAnim.cs"); } }
private void DeletePreviousImage() { try { if (_image != null) { this.RemoveLogicalChild(_image); _image = null; } if (_gifAnimation != null) { this.RemoveLogicalChild(_gifAnimation); _gifAnimation = null; } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "DeletePreviousImage()", "Controls\\VMuktiGrid\\ImageAnim.cs"); } }
static public void Load(ContentManager Content) { #region Avatar Avatar_Run_N = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_N"); Avatar_Run_E = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_E"); Avatar_Run_S = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_S"); Avatar_Run_W = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_W"); Avatar_Run_NE = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_NE"); Avatar_Run_SE = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_SE"); Avatar_Run_NW = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_NW"); Avatar_Run_SW = Content.Load <GifAnimation>(@"Avatar\Avatar_Run_SW"); Avatar_Ready_N = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_N"); Avatar_Ready_E = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_E"); Avatar_Ready_S = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_S"); Avatar_Ready_W = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_W"); Avatar_Ready_NE = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_NE"); Avatar_Ready_SE = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_SE"); Avatar_Ready_NW = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_NW"); Avatar_Ready_SW = Content.Load <GifAnimation>(@"Avatar\Avatar_Ready_SW"); Avatar_Aim_N = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_N"); Avatar_Aim_E = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_E"); Avatar_Aim_S = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_S"); Avatar_Aim_W = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_W"); Avatar_Aim_NE = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_NE"); Avatar_Aim_SE = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_SE"); Avatar_Aim_NW = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_NW"); Avatar_Aim_SW = Content.Load <GifAnimation>(@"Avatar\Avatar_Aim_SW"); Avatar_Fire_N = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_N"); Avatar_Fire_E = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_E"); Avatar_Fire_S = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_S"); Avatar_Fire_W = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_W"); Avatar_Fire_NE = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_NE"); Avatar_Fire_SE = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_SE"); Avatar_Fire_NW = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_NW"); Avatar_Fire_SW = Content.Load <GifAnimation>(@"Avatar\Avatar_Fire_SW"); Avatar_Hold_N = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_N"); Avatar_Hold_E = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_E"); Avatar_Hold_S = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_S"); Avatar_Hold_W = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_W"); Avatar_Hold_NE = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_NE"); Avatar_Hold_SE = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_SE"); Avatar_Hold_NW = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_NW"); Avatar_Hold_SW = Content.Load <GifAnimation>(@"Avatar\Avatar_Hold_SW"); #endregion Avatar #region sounds ChargeSound = Content.Load <SoundEffect>(@"Sounds\Charge"); ChargeLoopSound = Content.Load <SoundEffect>(@"Sounds\ChargeLoop"); FireGunSound = Content.Load <SoundEffect>(@"Sounds\Fire"); ClackSound = Content.Load <SoundEffect>(@"Sounds\clack"); PocketSound = Content.Load <SoundEffect>(@"Sounds\pocket"); ThwopSound = Content.Load <SoundEffect>(@"Sounds\thwop"); PlopSound = Content.Load <SoundEffect>(@"Sounds\FingerPlop4"); BumperSound = Content.Load <SoundEffect>(@"Sounds\dup"); #endregion #region textures instructionsImage = Content.Load <Texture2D>(@"Instructions"); starImage = Content.Load <Texture2D>(@"star"); AimStickImage = Content.Load <Texture2D>("AimStick"); CrosshairImage = Content.Load <Texture2D>("crosshair"); bluePlanetImage = Content.Load <Texture2D>(@"Balls\bluePlanet"); NoiseBallImage = Content.Load <Texture2D>(@"Balls\NoiseBall"); CueBallImage = Content.Load <Texture2D>(@"Balls\cueball"); Ball1Image = Content.Load <Texture2D>(@"Balls\1ball"); Ball2Image = Content.Load <Texture2D>(@"Balls\2ball"); Ball3Image = Content.Load <Texture2D>(@"Balls\3ball"); Ball4Image = Content.Load <Texture2D>(@"Balls\4ball"); Ball5Image = Content.Load <Texture2D>(@"Balls\5ball"); Ball6Image = Content.Load <Texture2D>(@"Balls\6ball"); Ball7Image = Content.Load <Texture2D>(@"Balls\7ball"); Ball8Image = Content.Load <Texture2D>(@"Balls\8ball"); Ball9Image = Content.Load <Texture2D>(@"Balls\9ball"); Ball10Image = Content.Load <Texture2D>(@"Balls\10ball"); Ball11Image = Content.Load <Texture2D>(@"Balls\11ball"); Ball12Image = Content.Load <Texture2D>(@"Balls\12ball"); Ball13Image = Content.Load <Texture2D>(@"Balls\13ball"); Ball14Image = Content.Load <Texture2D>(@"Balls\14ball"); Ball15Image = Content.Load <Texture2D>(@"Balls\15ball"); TableImage = Content.Load <Texture2D>(@"Table"); #endregion ArielFont = Content.Load <SpriteFont>("SpriteFont1"); BodoniFont = Content.Load <SpriteFont>("SpriteFont2"); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); back = Content.Load<GifAnimation>(@"background\sfz2-vega-animated"); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); back = Content.Load <GifAnimation>(@"background\sfz2-vega-animated"); backgroundRectangle = new Rectangle(0, 0, Window.ClientBounds.Width, Window.ClientBounds.Height); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); back = Content.Load<GifAnimation>(@"background\sfz2-vega-animated"); backgroundRectangle = new Rectangle(0, 0, Window.ClientBounds.Width,Window.ClientBounds.Height); }