This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
/
Mannux.html
90 lines (81 loc) · 3.17 KB
/
Mannux.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
<title>Mannux</title>
<link rel="stylesheet" href="../Common/browser.css">
<link rel="stylesheet" href="mannux.css">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body onload="onLoad()">
<script type="text/javascript">
var jsilConfig = {
printStackTrace: false,
webgl2d: true,
xna: 3,
winForms: true,
readOnlyStorage: true,
manifests: [
"Mannux.exe",
"Content.contentproj"
],
showProgressBar: true,
showStats: true,
};
</script>
<script src="../Libraries/JSIL.js" type="text/javascript"></script>
<canvas id="canvas" width="800" height="600">
</canvas><br>
<button id="quitButton" title="Quit Game">X</button>
<div id="welcomeMessage">
<p align="center"><a href="http://jsil.org/"><img src="http://jsil.org/images/jsil_48px.png" alt="JSIL logo" border="0"></a></p>
<p>This demo is a simple XNA 3.1 game, compiled from C# to JavaScript using <A href="http://jsil.org/">JSIL, my open-source C# to JavaScript compiler</a>. It should run in any browser that supports HTML5 and a modern version of JavaScript, no plugins required.</p>
<p align="center">To begin playing, click the <b>Load Game</b> button below.</p>
</div>
<button id="loadButton">Load Game</button>
<div id="log"><center><i>Arrow keys to move. Space to jump. Ctrl to fire.</i></center><br></div>
<script type="text/javascript">
var scriptRoot = "";
var libraryRoot = "../Libraries/";
var fileRoot = "Content/";
var contentRoot = "Content/";
var assetsToLoad = [
["File", "Data/Maps/test.map"],
["File", "Data/Maps/test2.map"],
["File", "Mannux.map"],
["File", "map00.map"],
["File", "map01.map"],
["File", "MAP02.MAP"],
["File", "MAP03.MAP"],
["File", "MAP04.MAP"],
["File", "shaft.map"],
["File", "testmap.map"],
["File", "boom.txt"],
["File", "bullet.txt"],
["File", "door.txt"],
["File", "ripper.txt"],
["File", "tabby.txt"]
];
function runMain () {
try {
document.getElementById("welcomeMessage").setAttribute("style", "display: none");
} catch (ex) {
}
// We can't invoke Main() since it disposes the Game immediately, breaking everything.
var asm = JSIL.GetAssembly("Mannux, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
var game = new asm.Engine();
game.Run();
};
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6375004-2']);
_gaq.push(['_setDomainName', '.luminance.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>