Bonjour a tous et merci d'avance.

Voila je suis en train de faire un héritage en js Loader est la classe fille l'héritage marche avec config mais ne reconnais pas dispatcher.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
//fichier dispatcher.js
function Dispatcher(){
    this.events='';//[];
}
 
//fichier config.js
function Config ()
{
    this.clipping = 500;
    this.assetFolder = 'http://127.0.0.1/jeux/assets/';
}
 
//fichier loader.js
function Loader (engine,level)
{ 
 
    this.include = function(file){
        var oScript =  document.createElement("script");
        oScript.src = file;
        oScript.type = "text/javascript";
        document.head.appendChild(oScript);}
 
    //this.sceneLoaded = function () {return (isLoaded) ? this.scene : false}
 
    //Code
    this.include('/jeux/core/config.js');//Les deux fichiers sont bien chargés
    this.include('/jeux/core/dispatcher.js');//Les deux fichiers sont bien chargés
 
    Config.call(this);
    Dispatcher.call(this);
}
 
//Uncaught ReferenceError: Dispatcher is not defined -> loader.js:27