Quellcode durchsuchen

first work

tags/v0.1.11
Big Bad Waffle vor 6 Jahren
Ursprung
Commit
364db1953e
3 geänderte Dateien mit 21 neuen und 10 gelöschten Zeilen
  1. +7
    -3
      src/client/js/app.js
  2. +6
    -2
      src/client/js/components/player.js
  3. +8
    -5
      src/client/js/main.js

+ 7
- 3
src/client/js/app.js Datei anzeigen

@@ -17,9 +17,13 @@ require.config({
'helpers': 'js/misc/helpers',
'particles': 'plugins/pixi.particles',
'picture': 'plugins/pixi.picture',
'pixi': 'plugins/pixi.min'
'pixi': 'plugins/pixi.min',
'howler': 'plugins/howler.min'
},
shim: {
'howler': {
exports: 'howl'
},
'socket': {
exports: 'io'
},
@@ -55,8 +59,8 @@ require.config({

require([
'main'
], function(
], function (
main
) {
main.init();
});
});

+ 6
- 2
src/client/js/components/player.js Datei anzeigen

@@ -1,11 +1,13 @@
define([
'js/rendering/renderer',
'js/system/events',
'js/misc/physics'
'js/misc/physics',
'js/sound/sound'
], function (
renderer,
events,
physics
physics,
sound
) {
var scale = 40;

@@ -53,6 +55,8 @@ define([
x: dx,
y: dy
}, instant);

sound.update(obj.x, obj.y);
},

extend: function (blueprint) {


+ 8
- 5
src/client/js/main.js Datei anzeigen

@@ -8,6 +8,7 @@ define([
'js/input',
'js/system/events',
'js/resources',
'js/sound/sound',
'ui/templates/inventory/inventory',
'ui/templates/equipment/equipment',
'ui/templates/stash/stash',
@@ -30,12 +31,14 @@ define([
numbers,
input,
events,
resources
resources,
sound
) {
return {
hasFocus: true,

init: function () {
sound.init();
client.init(this.onClientReady.bind(this));
},

@@ -59,14 +62,14 @@ define([
$(window).on('contextmenu', function (e) {
var allowedList = ['txtUsername', 'txtPassword'];

var allowed = allowedList.some(function(item) {
var allowed = allowedList.some(function (item) {
return $(e.target).hasClass(item);
});

if (!allowed) {
e.preventDefault();
return false;
}
e.preventDefault();
return false;
}
});

objects.init();


Laden…
Abbrechen
Speichern