Hallas/progress loader

This is a progress loader that uses a sprite and a mask to create a loading look and feel

Complete with callbacks for everything you need done while loading stuff in the background
One way to solve this might be to change the array type to [Void -> Any?] 

Will try it out later.

From,
Ankur Patel

* Please excuse any grammatical errors, sent from mobile device 📱

> On Aug 8, 2014, at 11:46 AM, Christoffer Hallas <notifications@github.com> wrote:
> 
> In PencilAdventure/PencilAdventure/LevelSelectScene.swift:
> 
> > -        NSLog("loading level")
> > -		
> > -        SoundManager.restartBackgroundMusic()
> > +  func loadLevel(level: String) {
> > +    var scene: GameScene? = nil
> > +    var work: Array<(Void) -> (Void)> = []
> > +    
> > +    SoundManager.restartBackgroundMusic()
> > +    
> > +    // A few background working jobs added to examplify how it works.
> > +    work.append({
> > +      usleep(500000)
> > +      return
> > +    })
> > +    
> > +    work.append({
> Doesn't seem like you're right about the return statement, the closure returns the value of the last statement even so..
> 
> 
> 
> —
> Reply to this email directly or view it on GitHub.