After-Load of adventures now possible.
This commit is contained in:
parent
2f8f71eee7
commit
fad7b3670e
5 changed files with 19 additions and 4 deletions
|
@ -6,9 +6,13 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>JSDSH - Javascript Dungeonslayers Helper</h1>
|
||||
|
||||
<div id="game"></div>
|
||||
<button id="load">Load</button>
|
||||
<script type="text/javascript" src="lib/crafty.js"></script>
|
||||
<script type="text/javascript" src="lib/jquery-1.11.1.min.js"></script>
|
||||
<script type="text/javascript" src="src/jsds_crafty.js"></script>
|
||||
<script type="text/javascript" src="src/adventure_01.js"></script>
|
||||
<script type="text/javascript" src="src/base_ui.js"></script>
|
||||
<!-- <script type="text/javascript" src="" id="adv"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
4
lib/jquery-1.11.1.min.js
vendored
Normal file
4
lib/jquery-1.11.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
start_init();
|
||||
|
||||
var wall = [];
|
||||
|
||||
wall.push(Crafty.e("Wall").wall(240,0,10,250));
|
||||
|
|
3
src/base_ui.js
Normal file
3
src/base_ui.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
$(document).ready( function() {
|
||||
$('#load').click(function() { $.getScript("src/adventure_01.js");});
|
||||
});
|
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
Crafty.init(500,250, document.getElementById('game'));
|
||||
|
||||
Crafty.c(
|
||||
"Wall", {
|
||||
init: function() {
|
||||
|
@ -95,7 +93,11 @@
|
|||
|
||||
});*/
|
||||
|
||||
var end_init= function() {
|
||||
var start_init = function() {
|
||||
Crafty.init(500,250, document.getElementById('game'));
|
||||
};
|
||||
|
||||
var end_init = function() {
|
||||
Crafty("Creature").each( function() {
|
||||
this.disableControl();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue