Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate


Sunday, September 9th, 2007 at 8:46:19pm UTC 

  1. public function new () {
  2.    Reflect.setField(flash.Lib.current, "start", start);
  3.    Reflect.setField(flash.Lib.current, "reset", reset);
  4.    Reflect.setField(flash.Lib.current, "quit",  quit);
  5. }
  7. // now these methods get called from the master film:
  8. public function start () { /* application start code */ }
  9. public function reset () { /* application reset code */ }
  10. public function quit () {
  11.    // a small hack to call the GameManager.gameDone method:
  12.    var func = Reflect.field(Type.resolveClass("com.casualgameplay.cgdc.GameManager"), "getInstance");
  13.    var gm = Reflect.callMethod(Type.resolveClass("com.casualgameplay.cgdc.GameManager"), func, []);
  14.    Reflect.callMethod(gm, Reflect.field(gm, "gameDone"), []);
  15. }


Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)

Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus