Click here to Skip to main content
15,909,530 members
Home / Discussions / C#
   

C#

 
GeneralRe: using C# to implement Windows Service Pin
George_George3-Apr-08 23:55
George_George3-Apr-08 23:55 
GeneralExtending Visual Studio 2005 Pin
Strannick3-Apr-08 22:24
Strannick3-Apr-08 22:24 
GeneralRe: Extending Visual Studio 2005 Pin
Pete O'Hanlon3-Apr-08 23:07
mvePete O'Hanlon3-Apr-08 23:07 
GeneralPersist data in design-time/runtime Pin
LuKas23_3-Apr-08 22:10
LuKas23_3-Apr-08 22:10 
Generalpop client in c#, connect with gmail.com Pin
dift3-Apr-08 21:50
dift3-Apr-08 21:50 
GeneralRe: pop client in c#, connect with gmail.com Pin
ChrisKo4-Apr-08 4:16
ChrisKo4-Apr-08 4:16 
QuestionData Grid Pin
Member 45007023-Apr-08 21:06
Member 45007023-Apr-08 21:06 
GeneralRe: Data Grid Pin
pmarfleet3-Apr-08 21:45
pmarfleet3-Apr-08 21:45 
GeneralRe: Data Grid Pin
Rick van Woudenberg4-Apr-08 3:44
Rick van Woudenberg4-Apr-08 3:44 
Questionhow can we get the call stack of target process Pin
sujithkumarsl3-Apr-08 20:50
sujithkumarsl3-Apr-08 20:50 
AnswerRe: how can we get the call stack of target process Pin
Pete O'Hanlon4-Apr-08 1:22
mvePete O'Hanlon4-Apr-08 1:22 
QuestionFTP Download trouble Pin
m1n1me3-Apr-08 20:24
m1n1me3-Apr-08 20:24 
GeneralRe: FTP Download trouble Pin
Sam Xavier24-Apr-08 21:11
Sam Xavier24-Apr-08 21:11 
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 

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.