Added Pong
This commit is contained in:
parent
e53c2a82c4
commit
cee10d5f75
94 changed files with 12789 additions and 0 deletions
50
games/Pong/Classes/PongViewController.h
Normal file
50
games/Pong/Classes/PongViewController.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
//
|
||||
// PongViewController.h
|
||||
// Pong
|
||||
//
|
||||
// Created by Jeena on 26.01.11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "GGSDelegate.h"
|
||||
#import "GGSNetwork.h"
|
||||
|
||||
enum GameType {
|
||||
kGameTypeSinglePlayer = 0,
|
||||
kGameTypeMultiPlayer,
|
||||
kGameTypeNetworkMultiPlayer
|
||||
};
|
||||
|
||||
@interface PongViewController : UIViewController <GGSDelegate> {
|
||||
IBOutlet UIView *ballView;
|
||||
IBOutlet UIView *player1View;
|
||||
IBOutlet UIView *player2View;
|
||||
IBOutlet UILabel *tapToBegin;
|
||||
CGPoint ballVelocity;
|
||||
BOOL gamePaused;
|
||||
|
||||
IBOutlet UILabel *pointsP1;
|
||||
IBOutlet UILabel *pointsP2;
|
||||
|
||||
GGSNetwork *ggsNetwork;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView *ballView;
|
||||
@property (nonatomic, retain) IBOutlet UIView *player1View;
|
||||
@property (nonatomic, retain) IBOutlet UIView *player2View;
|
||||
@property (nonatomic, retain) IBOutlet UIView *tapToBegin;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel *pointsP1;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *pointsP2;
|
||||
|
||||
@property (nonatomic, retain) GGSNetwork *ggsNetwork;
|
||||
|
||||
- (void)startPositions;
|
||||
- (void)zeroPoints;
|
||||
|
||||
- (void)moveBall;
|
||||
- (void)positionPlayer:(CGPoint)point;
|
||||
|
||||
@end
|
||||
|
Reference in a new issue