mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
context awarenes in Core
This commit is contained in:
parent
b82b02d4ab
commit
c1a4f16cc4
14 changed files with 50 additions and 14 deletions
|
|
@ -1,9 +1,8 @@
|
||||||
define([
|
define([
|
||||||
"Game/Core/Collision/Detector",
|
"Game/Core/Collision/Detector"
|
||||||
"Lib/Vendor/Box2D"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
function (Parent, Box2D) {
|
function (Parent) {
|
||||||
|
|
||||||
function Detector (player) {
|
function Detector (player) {
|
||||||
Parent.call(this, player);
|
Parent.call(this, player);
|
||||||
|
|
@ -11,5 +10,8 @@ function (Parent, Box2D) {
|
||||||
|
|
||||||
Detector.prototype = Object.create(Parent.prototype);
|
Detector.prototype = Object.create(Parent.prototype);
|
||||||
|
|
||||||
|
Detector.IDENTIFIER = Parent.IDENTIFIER; // Needed because otherwise it will not be
|
||||||
|
// inherited because it is not in prototype
|
||||||
|
|
||||||
return Detector;
|
return Detector;
|
||||||
});
|
});
|
||||||
9
app/Game/Client/Loader/Level.js
Normal file
9
app/Game/Client/Loader/Level.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
define([
|
||||||
|
"Game/Core/Loader/Level"
|
||||||
|
],
|
||||||
|
|
||||||
|
function(Parent) {
|
||||||
|
|
||||||
|
return Parent;
|
||||||
|
|
||||||
|
});
|
||||||
9
app/Game/Client/Physics/Doll.js
Normal file
9
app/Game/Client/Physics/Doll.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
define([
|
||||||
|
"Game/Core/Physics/Doll"
|
||||||
|
],
|
||||||
|
|
||||||
|
function(Parent) {
|
||||||
|
|
||||||
|
return Parent;
|
||||||
|
|
||||||
|
});
|
||||||
9
app/Game/Client/Player.js
Normal file
9
app/Game/Client/Player.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
define([
|
||||||
|
"Game/Core/Player"
|
||||||
|
],
|
||||||
|
|
||||||
|
function(Parent) {
|
||||||
|
|
||||||
|
return Parent;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
define([
|
define([
|
||||||
"Game/Core/Physics/Engine",
|
"Game/" + GLOBALS.context + "/Physics/Engine",
|
||||||
"Game/Core/Loader/Level",
|
"Game/" + GLOBALS.context + "/Loader/Level",
|
||||||
"Game/Core/Player"
|
"Game/" + GLOBALS.context + "/Player"
|
||||||
],
|
],
|
||||||
|
|
||||||
function (Engine, Level, Player) {
|
function (Engine, Level, Player) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
define([
|
define([
|
||||||
"Game/Config/Settings",
|
"Game/Config/Settings",
|
||||||
"Lib/Vendor/Box2D",
|
"Lib/Vendor/Box2D",
|
||||||
"Game/Core/Collision/Detector"
|
"Game/" + GLOBALS.context + "/Collision/Detector"
|
||||||
|
|
||||||
], function (Settings, Box2D, CollisionDetector) {
|
], function (Settings, Box2D, CollisionDetector) {
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
define([
|
define([
|
||||||
"Lib/Vendor/Box2D",
|
"Lib/Vendor/Box2D",
|
||||||
"Game/Config/Settings",
|
"Game/Config/Settings",
|
||||||
"Game/Core/Collision/Detector"
|
"Game/" + GLOBALS.context + "/Collision/Detector"
|
||||||
],
|
],
|
||||||
|
|
||||||
function (Box2D, Settings, CollisionDetector) {
|
function (Box2D, Settings, CollisionDetector) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
define([
|
define([
|
||||||
"Game/Config/Settings",
|
"Game/Config/Settings",
|
||||||
"Lib/Vendor/Box2D",
|
"Lib/Vendor/Box2D",
|
||||||
"Game/Core/Collision/Detector"
|
"Game/" + GLOBALS.context + "/Collision/Detector"
|
||||||
],
|
],
|
||||||
|
|
||||||
function (Settings, Box2D, CollisionDetector) {
|
function (Settings, Box2D, CollisionDetector) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
define([
|
define([
|
||||||
"Game/Core/Physics/Doll",
|
"Game/" + GLOBALS.context + "/Physics/Doll",
|
||||||
"Game/Config/Settings"
|
"Game/Config/Settings"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
define([
|
define([
|
||||||
"Game/Core/Collision/Detector",
|
"Game/Core/Collision/Detector"
|
||||||
"Lib/Vendor/Box2D"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
function (Parent, Box2D) {
|
function (Parent) {
|
||||||
|
|
||||||
function Detector (player) {
|
function Detector (player) {
|
||||||
Parent.call(this, player);
|
Parent.call(this, player);
|
||||||
|
|
@ -11,5 +10,8 @@ function (Parent, Box2D) {
|
||||||
|
|
||||||
Detector.prototype = Object.create(Parent.prototype);
|
Detector.prototype = Object.create(Parent.prototype);
|
||||||
|
|
||||||
|
Detector.IDENTIFIER = Parent.IDENTIFIER; // Needed because otherwise it will not be
|
||||||
|
// inherited because it is not in prototype
|
||||||
|
|
||||||
return Detector;
|
return Detector;
|
||||||
});
|
});
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
define([
|
define([
|
||||||
"Game/Core/Level"
|
"Game/Core/Loader/Level"
|
||||||
],
|
],
|
||||||
|
|
||||||
function(Parent) {
|
function(Parent) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
GLOBALS = { context: "Server" };
|
||||||
var requirejs = require('requirejs');
|
var requirejs = require('requirejs');
|
||||||
|
|
||||||
requirejs.config({
|
requirejs.config({
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
GLOBALS = { context: "Client" };
|
||||||
|
|
||||||
requirejs.config({
|
requirejs.config({
|
||||||
baseUrl: 'app',
|
baseUrl: 'app',
|
||||||
deps: ['Lib/Utilities/Extensions']
|
deps: ['Lib/Utilities/Extensions']
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
GLOBALS = { context: "Server" };
|
||||||
var requirejs = require('requirejs');
|
var requirejs = require('requirejs');
|
||||||
|
|
||||||
var inspector;
|
var inspector;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue