//只有指定的Hit能够通过 public override bool Check(HitDef hitDef) { if (!IsActive()) { return(true); } foreach (var hitInfo in this.m_infos) { if ((hitInfo.hitFlag & hitDef.hitFlag) != 0 && hitInfo.hitType == hitDef.hitType) { return(true); } } return(false); }
private static bool CanBeHit(HitDef hitDef, HitBy hitBy, NoHitBy noHitBy, PhysicsType defenderPhysicsType) { if (hitBy != null && !hitBy.Check(hitDef)) { return(false); } if (noHitBy != null && noHitBy.Check(hitDef)) { return(false); } int hitFlag = hitDef.hitFlag; if ((hitFlag & (int)HitFlag.H) != 0) { if (defenderPhysicsType == PhysicsType.Stand) { return(true); } } if ((hitFlag & (int)HitFlag.L) != 0) { if (defenderPhysicsType == PhysicsType.Crouch) { return(true); } } /* * if ((hitFlag & (int)HitFlag.A) != 0) * { * if (defenderPhysicsType == PhysicsType.Air && (this.fsmMgr.stateNo != 5050)) * return true; * } * if ((hitFlag & (int)HitFlag.F) != 0) * { * if (defenderPhysicsType == PhysicsType.Air && (fsmMgr.stateNo == 5050)) * return true; * } * if ((hitFlag & (int)HitFlag.D) != 0) * { * } */ return(false); }
private static bool CanBeGuard(HitDef hitDef, PhysicsType defenderPhysicsType) { int guardFlag = hitDef.guardFlag; if ((guardFlag & (int)GuardFlag.H) != 0) { if (defenderPhysicsType == PhysicsType.Stand) { return(true); } } if ((guardFlag & (int)GuardFlag.L) != 0) { if (defenderPhysicsType == PhysicsType.Crouch) { return(true); } } return(false); }
public virtual bool Check(HitDef hitDef) { return(false); }
public void SetBeHitDef(HitDef hitDef) { m_beHitDefData = hitDef; }
public void SetHitDef(HitDef hitDef) { m_hitDefData = hitDef; }