Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
QuestionUninitialized Object COM Exception Pin
bhavincpatel3-Apr-08 20:04
bhavincpatel3-Apr-08 20:04 
GeneralPerformance analysis Pin
sujithkumarsl3-Apr-08 19:54
sujithkumarsl3-Apr-08 19:54 
GeneralRe: Performance analysis Pin
Dave Kreskowiak4-Apr-08 5:39
mveDave Kreskowiak4-Apr-08 5:39 
Questioncreating Shortcut keys Pin
sumanshakya3-Apr-08 19:24
sumanshakya3-Apr-08 19:24 
GeneralRe: creating Shortcut keys Pin
rah_sin3-Apr-08 20:45
professionalrah_sin3-Apr-08 20:45 
GeneralRe: creating Shortcut keys Pin
N a v a n e e t h3-Apr-08 20:46
N a v a n e e t h3-Apr-08 20:46 
GeneralReportViewer: Printing only on odd pages Pin
Maddie from Dartford3-Apr-08 19:05
Maddie from Dartford3-Apr-08 19:05 
GeneralXbox controller Pin
meister_skypie3-Apr-08 19:03
meister_skypie3-Apr-08 19:03 
Hello..

I'm doing Reimer's tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Moving_water.php[^], and now I'm trying to run the code in the xbox. I used refer to other tutorials but still I can't do it. I really hope that somebody can solve my problem. Frown | :(
This is the code I want to change using the controller:


float x = 0.5f;<br />
float y = 1.0f;<br />
<br />
private void ProcessInput(float amountOfMovement)<br />
        {<br />
            Vector3 moveVector = new Vector3();<br />
<br />
            KeyboardState keys = Keyboard.GetState();<br />
            if (keys.IsKeyDown(Keys.Right))<br />
                moveVector.X += amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Left))<br />
                moveVector.X -= amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Down))<br />
                moveVector.Y -= amountOfMovement;<br />
            if (keys.IsKeyDown(Keys.Up))<br />
                moveVector.Y += amountOfMovement;<br />
<br />
            if (keys.IsKeyDown(Keys.Add))<br />
                x += 0.1f;<br />
                y += 0.1f;<br />
            if (keys.IsKeyDown(Keys.Subtract))<br />
                x -= 0.1f;<br />
                y -= 0.1f;<br />
<br />
            Matrix cameraRotation = Matrix.CreateRotationX(cameraAngles.X) * Matrix.CreateRotationZ(cameraAngles.Z);<br />
            cameraPosition += Vector3.Transform(moveVector, cameraRotation);<br />
<br />
            MouseState currentMouseState = Mouse.GetState();<br />
            if (currentMouseState.X != p_mouseState.X)<br />
                cameraAngles.Z -= amountOfMovement / 80.0f * (currentMouseState.X - p_mouseState.X);<br />
            if (currentMouseState.Y != p_mouseState.Y)<br />
                cameraAngles.X -= amountOfMovement / 80.0f * (currentMouseState.Y - p_mouseState.Y);<br />
            Mouse.SetPosition(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2);<br />
        }<br />

GeneralRe: Xbox controller Pin
MarkB7773-Apr-08 19:43
MarkB7773-Apr-08 19:43 
QuestionShould I use Crystal Report in this case? Pin
Faysal3-Apr-08 17:41
Faysal3-Apr-08 17:41 
GeneralRe: Should I use Crystal Report in this case? Pin
carbon_golem4-Apr-08 2:46
carbon_golem4-Apr-08 2:46 
GeneralKey Board hooks Pin
ASysSolvers3-Apr-08 17:23
ASysSolvers3-Apr-08 17:23 
GeneralRe: Key Board hooks Pin
Giorgi Dalakishvili3-Apr-08 22:33
mentorGiorgi Dalakishvili3-Apr-08 22:33 
Questionhow to post an image Pin
netJP12L3-Apr-08 16:27
netJP12L3-Apr-08 16:27 
AnswerRe: how to post an image Pin
Vikram A Punathambekar3-Apr-08 19:24
Vikram A Punathambekar3-Apr-08 19:24 
Generalfinding error Pin
tittly3-Apr-08 16:18
tittly3-Apr-08 16:18 
GeneralRe: finding error Pin
CodingYoshi3-Apr-08 16:29
CodingYoshi3-Apr-08 16:29 
GeneralRe: finding error Pin
gspiteri3-Apr-08 16:37
gspiteri3-Apr-08 16:37 
GeneralRe: finding error Pin
tittly3-Apr-08 16:42
tittly3-Apr-08 16:42 
GeneralRe: finding error [modified] Pin
C#Coudou3-Apr-08 20:08
C#Coudou3-Apr-08 20:08 
QuestionHow to create a keypress event on a form? Pin
Silvyster3-Apr-08 15:40
Silvyster3-Apr-08 15:40 
GeneralRe: How to create a keypress event on a form? Pin
CodingYoshi3-Apr-08 16:17
CodingYoshi3-Apr-08 16:17 
GeneralRe: How to create a keypress event on a form? Pin
Silvyster3-Apr-08 16:39
Silvyster3-Apr-08 16:39 
GeneralRe: How to create a keypress event on a form? Pin
CodingYoshi3-Apr-08 16:50
CodingYoshi3-Apr-08 16:50 
GeneralRe: How to create a keypress event on a form? Pin
Vikram A Punathambekar3-Apr-08 19:29
Vikram A Punathambekar3-Apr-08 19:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.