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; }
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 ; }
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; }
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 CheckTarget(SkillObj_Collision self, SkillObj_Collision target) { return(true); }
public virtual bool IsCollisionEnable(SkillObj_Collision self) { return(true); }
public override bool IsCollisionEnable(SkillObj_Collision self) { return(false); }
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; }
public override bool IsCollisionEnable(SkillObj_Collision self) { return false; }
public SkillCollision(SkillObj_Collision self, SkillBulletMove m, SkillVector3 v) { Self = self; move = m; CollisionInfo = v; }