Created
September 13, 2011 14:25
-
-
Save cupuyc/1213922 to your computer and use it in GitHub Desktop.
kickFms replacements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fasade.asc | |
// First place that accept incoming RPC from client side. | |
// --------------------------------------------------------------------------------- | |
Client.prototype.__resolve = function(ctype) { | |
// Check if a component class corresponding to ctype exists if so | |
// return a new facade factory for ctype components | |
if ( gFrameworkFC.components[ctype] != null ) | |
return this[ctype] = new FCFactory(this, ctype); | |
// else do nothing, forcing a NetConnection.Call.Failed | |
} | |
// component.asc | |
// Component inside | |
// --------------------------------------------------------------------------------- | |
FCComponent = function( derivedTypeName, derivedType ) { | |
.......... | |
derivedType.instances = new Object(); | |
// Provide a create method so non-dynamic classes can be created manually | |
derivedType.create = function(name) { return this.instances[name] = new this(name); } | |
.......... | |
gFrameworkFC.registerComponent( derivedTypeName, derivedType ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment