-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayers.js
59 lines (47 loc) · 1.23 KB
/
Players.js
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
//children constructors
function test(a,b) {
this.Document.Logger("test"+arguments);
this.New(innerTest)
}
function innerTest() {
this.Document.Logger("innerTest")
}
var inner_player = function() {
this.Document.Logger("Player")
this.New(test,"from inner_player","not using array");
}
//main Document level Consstructors
var Player = function() {
var T = new Object_Document();
T.Logger("Player")
T.child = T.New(inner_player);
return T;
}
var SpecialPlayer = function() {
var T = new Object_Document();
T.Logger("Player")
T.child = T.New(test,"from special player",1,2,3);
return T;
}
var _player = new Player();
var _special_player = new SpecialPlayer();
function Parent() {
var T = new Object_Document();
T.addChild(T.New(ChildA));
return T;
}
function ChildA() {
this.addChild(this.New(ChildB));
}
function ChildB() {
this.Test = function() {
this.Dispatch("SOME_EVENT","string_argument");
}
}
var _parent = new Parent();
var _ca = _parent.children[0];
var _cb = _ca.children[0];
_parent.Listen("SOME_EVENT",function(event_arguments) {
console.log(this);
console.log(event_arguments);
})