Skip to content

Commit

Permalink
shmup web touch events
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyPatten committed Sep 30, 2023
1 parent 4fe9b3b commit b490e31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Projects/Website/Pages/Shmup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</pre>
</div>
<div>
<button class="btn btn-primary" @onmousedown="() => Games.Shmup.Shmup.ui_u_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_u_down = false">↑</button>
<button class="btn btn-primary" @onmousedown="() => Games.Shmup.Shmup.ui_d_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_d_down = false">↓</button>
<button class="btn btn-primary" @onmousedown="() => Games.Shmup.Shmup.ui_l_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_l_down = false">←</button>
<button class="btn btn-primary" @onmousedown="() => Games.Shmup.Shmup.ui_r_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_r_down = false">→</button>
<button class="btn btn-primary" @onmousedown="() => Games.Shmup.Shmup.ui_shoot_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_shoot_down = false">shoot</button>
<button class="btn btn-primary" @ontouchstart="() => Games.Shmup.Shmup.ui_u_down = true" @ontouchend="() => Games.Shmup.Shmup.ui_u_down = false" @onmousedown="() => Games.Shmup.Shmup.ui_u_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_u_down = false">↑</button>
<button class="btn btn-primary" @ontouchstart="() => Games.Shmup.Shmup.ui_d_down = true" @ontouchend="() => Games.Shmup.Shmup.ui_d_down = false" @onmousedown="() => Games.Shmup.Shmup.ui_d_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_d_down = false">↓</button>
<button class="btn btn-primary" @ontouchstart="() => Games.Shmup.Shmup.ui_l_down = true" @ontouchend="() => Games.Shmup.Shmup.ui_l_down = false" @onmousedown="() => Games.Shmup.Shmup.ui_l_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_l_down = false">←</button>
<button class="btn btn-primary" @ontouchstart="() => Games.Shmup.Shmup.ui_r_down = true" @ontouchend="() => Games.Shmup.Shmup.ui_r_down = false" @onmousedown="() => Games.Shmup.Shmup.ui_r_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_r_down = false">→</button>
<button class="btn btn-primary" @ontouchstart="() => Games.Shmup.Shmup.ui_shoot_down = true" @ontouchend="() => Games.Shmup.Shmup.ui_shoot_down = false" @onmousedown="() => Games.Shmup.Shmup.ui_shoot_down = true" @onmouseup="() => Games.Shmup.Shmup.ui_shoot_down = false">shoot</button>
<button class="btn btn-primary" @onclick="() => Console.EnqueueInput(ConsoleKey.Enter)">enter</button>
</div>
</div>
Expand Down

0 comments on commit b490e31

Please sign in to comment.