Adding back UnitDelegate protocol.
authorchsieh <chester.developer@hotmail.com>
Tue, 17 May 2011 04:43:30 +0000 (21:43 -0700)
committerchsieh <chester.developer@hotmail.com>
Tue, 17 May 2011 04:43:30 +0000 (21:43 -0700)
src/game/actor/Unit.h
src/game/actor/Unit.mm
src/game/actor/UnitDelegate.h

index 5ce2e6d..3fffdaa 100644 (file)
@@ -1,7 +1,10 @@
 #import "Sparrow.h"
+
 #import "render/QQSparrowExtensions.h"
 
 #import "game/actor/Actor.h"
+#import "game/actor/UnitDelegate.h"
+
 #import "physics/World.h"
 
 
 @interface Unit : Actor {
 
 @private
-    SPDisplayObject* _shape;
+    SPDisplayObject*  _shape;
+    id <UnitDelegate> _delegate;
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
 @property (nonatomic, retain, readwrite) SPDisplayObject* shape;
+@property (nonatomic, retain, readwrite) id <UnitDelegate> delegate;
 
 ////////////////////////////////////////////////////////////////////////////////////
 - (id) initWithFile:(NSString*)fileName atX:(float)x y:(float)y;
index 88e057a..2c6b4d5 100644 (file)
@@ -7,6 +7,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////////
 @synthesize shape = _shape;
+@synthesize delegate = _delegate;
 
 ////////////////////////////////////////////////////////////////////////////////////
 - (id) init {
index 4002d36..74e2d1a 100644 (file)
@@ -1,14 +1,3 @@
-//
-//  UnitDelegate.h
-//  tanks
-//
-//  Created by Doris Chen on 5/14/11.
-//  Copyright 2011 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@protocol UnitDelegate <NSObject>
+@protocol UnitDelegate
 -(void)updateWithTick:(float)time;
 @end