Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Namespace.Register("DeepElement.ThreeOneFour.Component")
- /*
- * Represents a Javascript Component Baseclass that supports async
- * loading/unloading
- *
- */
- DeepElement.ThreeOneFour.Component = new Class({
- Implements: Events,
- loaded: false,
- initialize: function() {},
- load: function(success, failure) {
- if (!this.loaded) {
- this.loaded = true;
- if (success != null) success();
- }
- },
- unload: function(success, failure) {
- if (this.loaded) {
- this.loaded = false;
- if (success != null) success();
- }
- },
- getLoaded: function() {
- return this.loaded;
- }
- });
Add Comment
Please, Sign In to add comment