Building XNA 2.0 Games- P8 potx
... PARTICLE MAYHEM 21 5 AddParticle(new Blood(loc, traj * Rand.GetRandomFloat( -0. 2f, 0f) + Rand.GetRandomVector2(- 1 20 f, 1 20 f, - 1 20 f, 1 20 f), 1f, 0f, 0f, 1f, Rand.GetRandomFloat (0. 01f, 0 .25 f), Rand.GetRandomInt (0, ... Smoke(loc, Rand.GetRandomVector2(-50f, 50f, -50f, 10f) - traj * Rand.GetRandomFloat (0. 001 f, 0. 1f), 1f, 1f, 1f, 0 .25 f, Rand.GetRandomFloat (0. 0...
Ngày tải lên: 01/07/2014, 22:20
Building XNA 2.0 Games- P1 potx
... said, it’s probably safe to dive in! Building XNA 2. 0 Games A Practical Guide for Independent Game Development ■■■ James Silva and John Sedlak Building XNA 2. 0 Games: A Practical Guide for Independent ... the publisher. ISBN-13 (pbk): 978-1-43 02 - 09 79-9 ISBN-13 (electronic): 978-1-43 02 - 09 80- 5 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trad...
Ngày tải lên: 01/07/2014, 22:20
Building XNA 2.0 Games- P2 potx
... the following: float[] paddleLoc = new float[] { 300 .0f, 300 .0f }; Vector2 ballLoc = new Vector2( 400 .0f, 300 .0f); Vector2 ballTraj = new Vector2(); bool playing = false; Because we have two paddles, ... < 100 .0f) paddleLoc[i] = 100 .0f; if (paddleLoc[i] > 500 .0f) paddleLoc[i] = 500 .0f; if (!playing) { if (state.Buttons.A == ButtonState.Pressed) { playing = true; ballLoc.X...
Ngày tải lên: 01/07/2014, 22:20
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
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
Building XNA 2.0 Games- P13 potx
... = 4; i < 12; i++) AddParticle(new Heat( Location+ (Trajectory* (float)i) * 0. 001 f + Rand.GetRandomVector2(-30f, 30f, -30f, 30f), Rand.GetRandomVector2(-30f, 30f, - 100 f, 0f), Rand.GetRandomFloat(.5f, ... 0. 0f; struct PS_INPUT { float2 TexCoord : TEXCOORD0; }; float2 GetDif(float2 _tex) { float2 dif; float2 tex = _tex; float2 btex = _tex; tex.x -= 0. 003 ; btex.x += 0....
Ngày tải lên: 01/07/2014, 22:20
Building XNA 2.0 Games- P15 potx
... for, 26 5 26 7 hit logic, in Wraith, 408 –411 Hit particle, creating, 21 1 21 2 hit points (HP), pummeling zombies, 25 0 25 1 HitManager class creating, 20 4 20 6 handling bullet impact in, 21 1 21 2 setting ... 45 50- cal wave file adding silence to end of duplicate track, 22 6 applying Cross Fade Out effect to, 22 6 applying echo to, 22 6 final clean up of, 22 8 22 9 fixing exce...
Ngày tải lên: 01/07/2014, 22:20
... (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
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
Building XNA 2.0 Games- P6 pptx
... Rectangle(5 90, 0, 300 , 600 ), new Color(new Vector4 (0. 0f, 0. 0f, 0. 0f, 0. 5f))); spriteBatch.Draw(nullTex, new Rectangle ( 20 0, 0, 1 50, 1 10) , new Color(new Vector4 (0. 0f, 0. 0f, 0. 0f, 0. 5f))); spriteBatch.End(); This ... Vector2 targ = new Vector2( Game1.ScreenSize.X / 2f - ((Game1.scroll.X / xLim) - 0. 5f) * 100 f, Game1.ScreenSize.Y / 2f - ((Game1.scroll.Y /...
Ngày tải lên: 01/07/2014, 22:20