2012年12月31日

摘要: 炮塔当然不仅仅能识别一种敌人,僵尸,人类,机器人都不会放过。Interface可以很好地完成这种囧境。接口仅能包含不影响类的内存布局的声明 – 可以声明枚举值、结构体和常量,但是不能声明变量。 我将牵扯到AttackInterface的相关信息全部罗列出来。class AntTower extends pawn placeble;var array<AntAttackInterface> DetectedAttackInterfaces;var AntAttackInterface CurrentEnemy; 在Touch中检测,该过程发生在上一章的Delegate实现函数。loc 阅读全文

posted @ 2012-12-31 12:09 neocsl 阅读(156) 评论(0) 推荐(0) 编辑

摘要: function Touch(Actor Other,PrimitiveComponent OtherComp,Vector HitLocation,vector HitNormal){ OnTouch(self,Other,OtherComp,HitLocation,HitNormal);}simulated delegate OnTouch(Actor Caller,Actor Other,PrimitiveComponent OtherComp,vector HitLocation,vector HitNormal); 代理Delegate可以使一个方法在不同的类中有不... 阅读全文

posted @ 2012-12-31 10:24 neocsl 阅读(228) 评论(0) 推荐(0) 编辑