Beispiel #1
0
		protected override void LoadContent() {
			// Create a new SpriteBatch, which can be used to draw textures.
			spriteBatch = new SpriteBatch( GraphicsDevice );
			spriteFont = Content.Load<SpriteFont>( "Fonts/Tahoma" );

			state = Keyboard.GetState();

			// provide Cardlist
			// => default to Poring
			Card.CardList.Add( new Card() );

			// add 3 Poring Cards
			mPlayer.DeckHandler.Deck.Add( Card.CardList[ 0 ] );
			mPlayer.DeckHandler.Deck.Add( Card.CardList[ 0 ] );
			mPlayer.DeckHandler.Deck.Add( Card.CardList[ 0 ] );

			// load textures
			mPlayer.DeckHandler.LoadCards( Content );

			// testing stuff..
			poringCard = Content.Load<Texture2D>( "Cards/1002" );

			RagnarokAnimation ani = new RagnarokAnimation();
			ani.Read( Content.RootDirectory + @"\Mobs\1002.ani", true );

			mAnimation = new AnimationHandler( ani );
			mAnimation.Initialize( GraphicsDevice );
			mAnimation.SetFrameLength( 0.15f );
		}
		public static void Load( string rootDir, int animationID ) {
			if( Animations.ContainsKey( animationID ) == true )
				return;

			RagnarokAnimation ani = new RagnarokAnimation();
			ani.Read( rootDir + @"\Mobs\" + animationID + ".ani", true );

			Animations.Add( animationID, ani );
		}