Michael Chen
f728240db9
Added keyboard controlling Added fixed ball reflections on right paddle added reflections on screen borders Added goal (miss the paddle) detection
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
@page
|
|
@model PongModel
|
|
@{
|
|
ViewData["Title"] = "Pong";
|
|
}
|
|
|
|
<div class="text-center">
|
|
<h1 class="display-4">Pong</h1>
|
|
<h3 id="connection">Connection Status</h3>
|
|
|
|
<button id="createlobby" class="btn btn-primary mb-3">Create</button>
|
|
<button id="leavelobby" class="btn btn-primary mb-3">Leave</button>
|
|
|
|
<div class="input-group mb-3">
|
|
<input id="roomid" type="text" class="form-control" placeholder="Room ID" aria-label="Room ID" aria-describedby="joinroom">
|
|
<button id="joinroom" class="btn btn-outline-secondary" type="button">Button</button>
|
|
</div>
|
|
|
|
<div class="input-group mb-3">
|
|
<input id="username" type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="setusername">
|
|
<button id="setusername" class="btn btn-outline-secondary" type="button">Set Username</button>
|
|
</div>
|
|
|
|
<div id="canvas-container" class="mb-3"></div>
|
|
</div>
|
|
|
|
<script src="~/lib/signalr/dist/browser/signalr.min.js"></script>
|
|
<script src="~/lib/signalr/dist/browser/signalr-protocol-msgpack.min.js"></script>
|
|
<script src="~/lib/pixi/dist/pixi.min.js"></script>
|
|
<script src="~/js/pong.js"></script> |