mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
create and configure callback handlers for state updates
add $.Dispatch to handle object events add subscribe calls to files update SM fireUpdate to use new Dispatch There are some NaN issues right now, no time to bug hunt right now, it does kind of function though
This commit is contained in:
+5
-5
@@ -41,6 +41,9 @@ var Space = {
|
||||
var h = $('<div>').attr('id', 'hullRemaining').appendTo(this.panel);
|
||||
$('<div>').addClass('row_key').text('hull: ').appendTo(h);
|
||||
$('<div>').addClass('row_val').appendTo(h);
|
||||
|
||||
//subscribe to stateUpdates
|
||||
$.Dispatch('stateUpdate').subscribe(Space.handleStateUpdates);
|
||||
},
|
||||
|
||||
options: {}, // Nothing for now
|
||||
@@ -449,8 +452,5 @@ var Space = {
|
||||
|
||||
handleStateUpdates: function(e){
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
//listener for StateManager update events
|
||||
$(Space).on('stateUpdate', Space.handleStateUpdates);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user