//
//  BouncingBallViewController.h
//  7dxBouncingBall
//
//  Created by Malcomic-XD on 5/3/14.
//  Copyright (c) 2014 Malcomic-XD. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreMotion/CoreMotion.h>

@interface BouncingBallViewController : UIViewController <UIAccelerometerDelegate>{
//Here is View Controller!!

//Image view for the game mode

UIImageView *bg;
UIImageView *howToPlay;
UIImageView *eric;
UIImageView *platform1;
UIImageView *platform2;
UIImageView *platform3;
UIImageView *platform4;
UIImageView *platform5;
    
    UIButton *btnPlay;
    UIButton *btnSettings;
    UIButton *btnHowToPlay;
    UIButton *btnBack;
    UIButton *btnMenu;
    UIButton *btnRestart;
    
    UILabel *lblScore;
   // UILabel *lblMenu;
   // UILabel *lblRestart;
    
    UISegmentedControl *scTouchTilt;
    
    NSInteger gameState;
    NSInteger touchState;
    NSInteger previousState;
    NSInteger score;
    NSInteger controlType;
    
    CGPoint ericVelocity;
    CGPoint gravity;
    
    //CMAcceleration *acceleration;
    
    
    

}

@property (nonatomic,retain) IBOutlet UIImageView *bg;
@property (nonatomic,retain) IBOutlet UIImageView *howToPlay;
@property (nonatomic,retain) IBOutlet UIImageView *eric;
@property (nonatomic,retain) IBOutlet UIImageView *platform1;
@property (nonatomic,retain) IBOutlet UIImageView *platform2;
@property (nonatomic,retain) IBOutlet UIImageView *platform3;
@property (nonatomic,retain) IBOutlet UIImageView *platform4;
@property (nonatomic,retain) IBOutlet UIImageView *platform5;

@property (nonatomic,retain) IBOutlet UIButton *btnPlay;
@property (nonatomic,retain) IBOutlet UIButton *btnSettings;
@property (nonatomic,retain) IBOutlet UIButton *btnHowToPlay;
@property (nonatomic,retain) IBOutlet UIButton *btnMenu;
@property (nonatomic,retain) IBOutlet UIButton *btnRestart;
@property (nonatomic,retain) IBOutlet UIButton *btnBack;

@property (nonatomic,retain) IBOutlet UISegmentedControl *scTouchTilt;

@property (nonatomic,retain) IBOutlet UILabel *lblScore;
//@property (nonatomic,retain) IBOutlet UILabel *lblMenu;
//@property (nonatomic,retain) IBOutlet UILabel *lblRestart;

@property (nonatomic) NSInteger gameState;
@property (nonatomic) NSInteger score;
@property (nonatomic) NSInteger previousState;
@property (nonatomic) NSInteger controlType;
@property (nonatomic) NSInteger touchState;

@property (nonatomic) CGPoint ericVelocity;
@property (nonatomic) CGPoint gravity;

//@property (nonatomic) CMAcceleration *acceleration;


- (void)gameStatePlayNormal;

- (IBAction)buttonClickedPlay;
- (IBAction)buttonClickedHowToPlay;
- (IBAction)buttonClickedSettings;
- (IBAction)buttonClickedMenu;
- (IBAction)buttonClickedRestart;
- (IBAction)buttonClickedBack;

-(IBAction)valueChanged;








@end
