public SkillBulletCollision(SkillObj_Collision self, SkillBulletMove m, SkillVector3 v)
            : base(self, m, v)
        {
            CollisionType = SkillCollisionType.SkillBullet;

            ActiveCollisions.Add(SkillCollisionType.SkillObj, SkillCollisionType.SkillObj);
        }
 public override OnCollideRet OnCollide(SkillObj_Collision self, SkillObj_Collision target)
 {
     var action = self.GetCallBackAction();
     if(action != null)
     {
         action(target.GetSkillObj());
     }
     return OnCollideRet.None;
 }
Example #3
0
        public SkillObjCollision(SkillObj_Collision self, SkillBulletMove m, SkillVector3 v) : base(self, m, v)
        {
            CollisionType = SkillCollisionType.SkillObj;

            ActiveCollisions.Add(SkillCollisionType.SkillObj, SkillCollisionType.SkillObj);

            PassiveCollision.Add(SkillCollisionType.SkillObj, SkillCollisionType.SkillObj);
            PassiveCollision.Add(SkillCollisionType.SkillBullet, SkillCollisionType.SkillBullet);
        }
        public override OnCollideRet OnCollide(SkillObj_Collision self, SkillObj_Collision target)
        {
            var action = self.GetCallBackAction();

            if (action != null)
            {
                action(target.GetSkillObj());
            }
            return(OnCollideRet.None);
        }
 public virtual void TickCollision(SkillObj_Collision self)
 {
     if(!IsCollisionEnable(self))
     {
         return;
     }
     var targets = self.GetCollisionListNearby();
     var selfCollision = self.GetCollision();
     foreach(var tar in targets.Where(t=>t.GetCollision() != selfCollision))
     {
         if(CheckTarget(self, tar))
         {
             var tarCollision = tar.GetCollision();
             if (selfCollision.CollisionDetect(tarCollision))
             {
                 var ret = OnCollide(self, tar);
             }
         }
     }
     return ;
 }
Example #6
0
        public virtual void TickCollision(SkillObj_Collision self)
        {
            if (!IsCollisionEnable(self))
            {
                return;
            }
            var targets       = self.GetCollisionListNearby();
            var selfCollision = self.GetCollision();

            foreach (var tar in targets.Where(t => t.GetCollision() != selfCollision))
            {
                if (CheckTarget(self, tar))
                {
                    var tarCollision = tar.GetCollision();
                    if (tarCollision != null && selfCollision.CollisionDetect(tarCollision))
                    {
                        var ret = OnCollide(self, tar);
                    }
                }
            }
            return;
        }
Example #7
0
 public SkillObjCollision(SkillObj_Collision self, SkillVector3 v)
     : this(self, null, v)
 {
 }
Example #8
0
 public virtual OnCollideRet OnCollide(SkillObj_Collision self, SkillObj_Collision target)
 {
     //Logger.LogError("命中命中命中命中命中命中命中" + BattleModule.BattleTickCount);
     return(OnCollideRet.None);
 }
Example #9
0
 public virtual bool CheckTarget(SkillObj_Collision self, SkillObj_Collision target)
 {
     return(true);
 }
Example #10
0
 public virtual bool IsCollisionEnable(SkillObj_Collision self)
 {
     return(true);
 }
Example #11
0
 public override bool IsCollisionEnable(SkillObj_Collision self)
 {
     return(false);
 }
Example #12
0
 public SkillObjCollision(SkillObj_Collision self, SkillVector3 v) : this(self, null, v)
 {
 }
 public virtual OnCollideRet OnCollide(SkillObj_Collision self, SkillObj_Collision target)
 {
     //Logger.LogError("命中命中命中命中命中命中命中" + BattleModule.BattleTickCount);
     return OnCollideRet.None;
 }
 public virtual bool IsCollisionEnable(SkillObj_Collision self)
 {
     return true;
 }
 public virtual bool CheckTarget(SkillObj_Collision self, SkillObj_Collision target)
 {
     return true;
 }
Example #16
0
 public override bool IsCollisionEnable(SkillObj_Collision self)
 {
     return false;
 }
Example #17
0
 public SkillCollision(SkillObj_Collision self, SkillBulletMove m, SkillVector3 v)
 {
     Self          = self;
     move          = m;
     CollisionInfo = v;
 }
Example #18
0
 public SkillCollision(SkillObj_Collision self, SkillBulletMove m, SkillVector3 v)
 {
     Self = self;
     move = m;
     CollisionInfo = v;
 }