コード例 #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);
        }
コード例 #2
0
ファイル: GameTest.cs プロジェクト: GodLesZ/svn-dump
		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 );
		}