本帖最后由 bdw9005 于 2015-9-11 22:34 编辑
- /*
- Bullet
- _size
- _bulletCount
-
- Gun
- _size
-
- -(void)shoot:(Bullet *)bullet;//该方法与子弹相关
- -(void)shoot:(Bullet *)bullet{
- _bulletCount--;
- ''''
- }
-
- Soldier
- _name;
- _life
- _level;
-
- -(void)fire:(Gun *)gun andBullet:(Bullet *)bullet;//该方法和子弹与枪相关
-
- -(void)fire:(Gun *)gun andBullet:(Bullet *)bullet{
-
- [gun shoot:buttle];
- }
-
- */
复制代码
|
|