Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct 5_adding_basic_code.md #69

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions articles/getting_started/5_adding_basic_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Find the `Update` method in the Game1.cs class file and add:
```csharp
if(Joystick.LastConnectedIndex == 0)
{
JoystickState jstate = Joystick.GetState(PlayerIndex.One);
JoystickState jstate = Joystick.GetState((int) PlayerIndex.One);

float updatedBallSpeed = ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;

Expand Down Expand Up @@ -202,10 +202,10 @@ If there is no controller, the code inside the if statement will be skipped over
### Get the current state of Joystick 1

```csharp
JoystickState jstate = Joystick.GetState(0);
JoystickState jstate = Joystick.GetState((int) PlayerIndex.One);
```

This code fetches the current first joystick state `Joystick.GetState(0)` and stores it into a variable called `jstate`.
This code fetches the current first joystick state `Joystick.GetState((int) PlayerIndex.One)` and stores it into a variable called `jstate`.

### CHeck the current value of "Axis" 2

Expand Down