Salut
Comment doit on faire pour gerer le deplacement d un projectile
J ai essaye cela mais ca ne marche pas... si quelqu un aurait un exemple simple ...merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 public override void Update(GameTime gameTime, Microsoft.Xna.Framework.Input.MouseState mouseState, Microsoft.Xna.Framework.Input.KeyboardState keyboardState) { float m = Speed;// *(float)gameTime.ElapsedGameTime.TotalSeconds; Vector += new Vector2(Vector.X * m, Vector.Y * m); } public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) { spriteBatch.Draw(_texture.Texture2D, Start + Vector, Color.White); }
Partager