#import "HowToPlay.h"
#import "Menu.h"

@implementation HowToPlay
{
    SKLabelNode * back;
}


-(void) didMoveToView:(SKView *)view
{
    
    SKSpriteNode * bg = [SKSpriteNode spriteNodeWithImageNamed:@"HTP.png"];
    bg.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame));
    [bg setScale:0.9];
    [self addChild:bg];
    
    back = [SKLabelNode labelNodeWithFontNamed:@"Chalkduster"];
    back.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)-250);
    back.text = @"Back";
    back.fontSize = 60;
    
    [self addChild:back];
    
    
    
    
    
    
    
    
    
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    
   

    for (UITouch *touch in touches)
    {
        CGPoint location       = [touch locationInNode:self];
        
        
        if([back containsPoint:location])
        {
            
            
            Menu        * inu = [[Menu alloc]initWithSize:self.size];
            inu.scaleMode = SKSceneScaleModeAspectFill;
            SKTransition *transition = [SKTransition fadeWithDuration:1];
            [self.view presentScene: inu transition:transition];
            
            
            
        }
    }
    
}

@end
