Building XNA 2 0 Games- P14 doc

Building XNA 2.0 Games- P14 doc

Building XNA 2.0 Games- P14 doc

... void MakeExplosion(Vector2 loc, float mag) { for (int i = 0; i < 8; i++) AddParticle(new Smoke(loc, Rand.getRandomVector2(- 100 f, 100 f, - 100 f, 100 f), 3 82 CHAPTER 12 ■ NETWORKING case Particle.PARTICLE_BULLET: ... new Vector2( 32. 0f, 32. 0f), size * (.5f - frame) * 2f, SpriteEffects.None, 1.0f); } } The sprites image has been updated to include our donut and circle at...

Ngày tải lên: 01/07/2014, 22:20

30 281 0
Building XNA 2.0 Games- P7 doc

Building XNA 2.0 Games- P7 doc

... i].GetLoc() * 2f + new Vector2 ( 20 f, 13f), Rand.getRandomVector2 (- 50. 0f, 50. 0f, - 300 .0f, - 20 0. 0f), 1.0f, 0. 8f, 0. 6f, 1.0f, Rand.getRandomFloat (0 .25 f, 0. 5f), Rand.getRandomInt (0, 4)), true ... mapSeg[LAYER_MAP, i].GetLoc() * 2f + new Vector2 ( 20 f, 37f), Rand.getRandomVector2 (- 30. 0f, 30. 0f, -25 0. 0f, - 20 0. 0f), Rand.getRandomFloat (0 .25 f, 0. 75f...

Ngày tải lên: 01/07/2014, 22:20

30 324 0
Building XNA 2.0 Games- P11 doc

Building XNA 2.0 Games- P11 doc

... (menuMode == MenuMode.Pause) { sprite.Draw(backTex, new Rectangle (0, 0, 128 0, 7 20 ), new Rectangle( 600 , 400 , 20 0, 20 0) , new Color(new Vector4(1f, 1f, 1f, .5f))); } sprite.End(); sprite.Begin(SpriteBlendMode.Additive); We’re ... left a bit • Divide 123 by 10 = 12 • Compute 12 mod 10 = 2 • Draw 2, shift left a bit • Divide 12 by 10 = 1 • Compute 1 mod 10 = 1 C...

Ngày tải lên: 01/07/2014, 22:20

30 262 0
Building XNA 2.0 Games: A Practical Guide for Independent Game Development ppt

Building XNA 2.0 Games: A Practical Guide for Independent Game Development ppt

... (ballLoc.X > 800 .0f) playing = false; if (ballLoc.X < 0. 0f) playing = false; if (ballLoc.Y < 50. 0f) { ballLoc.Y = 50. 0f; ballTraj.Y = -ballTraj.Y; } if (ballLoc.Y > 5 50. 0f) { ballLoc.Y ... ItemRemoved; Building XNA 2. 0 Games A Practical Guide for Independent Game Development ■■■ James Silva and John Sedlak 20 CHAPTER 2 ■ A CRASH COURSE IN XNA Buil...

Ngày tải lên: 05/03/2014, 22:21

453 1,5K 5
Building XNA 2.0 Games- P3 potx

Building XNA 2.0 Games- P3 potx

... text.Size = 0. 8f; spriteBatch.Begin(SpriteBlendMode.AlphaBlend); spriteBatch.Draw(nullTex, new Rectangle( 500 , 20 , 28 0, 5 50) , new Color (0, 0, 0, 100 )); spriteBatch.End(); for (int i = 0; i < ... it. text.Size = 3.0f; text.Color = new Color (0, 0, 0, 125 ); for (int i = 0; i < 3; i++) { if (i == 2) text.Color = Color.White; text.DrawText (25 - i * 2, 25 0...

Ngày tải lên: 01/07/2014, 22:20

30 305 0
Building XNA 2.0 Games- P4 potx

Building XNA 2.0 Games- P4 potx

... Color (25 5, 25 5, 25 5, 75); if (map.Ledges[i].Flags == 1) nColor = new Color (25 5, 0, 0, 75); spriteBatch.Draw(iconsTex, iVec, rect, nColor, 0. 0f, Vector2.Zero, 0 .25 f, SpriteEffects.None, 0. 0f); ... spriteBatch.Begin(SpriteBlendMode.AlphaBlend); for (int y = 0; y < 20 ; y++) { for (int x = 0; x < 20 ; x++) { Rectangle dRect = new Rectangle( x * 32 - (in...

Ngày tải lên: 01/07/2014, 22:20

30 337 0
Building XNA 2.0 Games- P5 ppt

Building XNA 2.0 Games- P5 ppt

... CHARACTER EDITOR 121 int fref = charDef.Animations[selAnim].KeyFrames[curKey].FrameRef; if (fref < 0) fref = 0; DrawCharacter(new Vector2( 500 f, 100 f), 0. 5f, FACE_LEFT, fref, true, 1.0f); We also ... scrolled. if (DrawButton(7 70, 28 0, 1, mouseState.X, mouseState.Y, (mouseState.LeftButton == ButtonState.Pressed)) && frameScroll > 0) frameScroll ; if (DrawB...

Ngày tải lên: 01/07/2014, 22:20

30 300 0
w