private void SendHitFlyImpact(GameObject obj, ImpactInfo impactInfo) { ImpactMicroGHitFly mircoGHitFly = obj.GetComponent <ImpactMicroGHitFly>(); ImpactHitFly hitFlyLogic = obj.GetComponent <ImpactHitFly>(); if (null != mircoGHitFly && mircoGHitFly.IsAcitve) { if (ImpactType.HitFly != mircoGHitFly.GetImpactType()) { mircoGHitFly.StopImpact(); if (null != hitFlyLogic) { hitFlyLogic.StartImpact(impactInfo); return; } } else { mircoGHitFly.OnHitInFly(); } return; } ImpactGrab grabLogic = obj.GetComponent <ImpactGrab>(); if (null != grabLogic && grabLogic.IsAcitve) { return; } ImpactKnockDown knockDownLogic = obj.GetComponent <ImpactKnockDown>(); if (null != knockDownLogic && knockDownLogic.IsAcitve) { knockDownLogic.StopImpact(); } ImpactStiffness stiffnessLogic = obj.GetComponent <ImpactStiffness>(); if (null != stiffnessLogic && stiffnessLogic.IsAcitve) { stiffnessLogic.StopImpact(); } if (null != hitFlyLogic) { /*if (hitFlyLogic.IsAcitve) { * hitFlyLogic.OnHitInFly(); * return; * }*/ hitFlyLogic.StopImpact(); hitFlyLogic.StartImpact(impactInfo); } }
private void SendKnockDownImpact(GameObject obj, ImpactInfo impactInfo) { ImpactMicroGHitFly mircoGHitFly = obj.GetComponent <ImpactMicroGHitFly>(); ImpactKnockDown knockDownLogic = obj.GetComponent <ImpactKnockDown>(); if (null != mircoGHitFly && mircoGHitFly.IsAcitve) { if (ImpactType.HitFly != mircoGHitFly.GetImpactType()) { mircoGHitFly.StopImpact(); if (null != knockDownLogic) { knockDownLogic.StartImpact(impactInfo); return; } } return; } ImpactGrab grabLogic = obj.GetComponent <ImpactGrab>(); if (null != grabLogic && grabLogic.IsAcitve) { return; } ImpactHitFly hitFlyLogic = obj.GetComponent <ImpactHitFly>(); if (null != hitFlyLogic && hitFlyLogic.IsAcitve && ImpactType.UnKnown == hitFlyLogic.GetImpactType()) { hitFlyLogic.StopImpact(); if (null != knockDownLogic) { knockDownLogic.StartImpact(impactInfo); return; } } if (null != hitFlyLogic && hitFlyLogic.IsAcitve && ImpactType.UnKnown != hitFlyLogic.GetImpactType()) { hitFlyLogic.OnKnockDown(); return; } if (null != knockDownLogic && !knockDownLogic.IsAcitve) { knockDownLogic.StartImpact(impactInfo); } }
private void SendMicroGHitFly(GameObject obj, ImpactInfo impactInfo) { ImpactMicroGHitFly microGHitFlyLogic = obj.GetComponent <ImpactMicroGHitFly>(); if (null != microGHitFlyLogic) { if (!microGHitFlyLogic.IsAcitve) { StopImpactExcept(obj, ImpactType.MicroGHitFly); microGHitFlyLogic.StartImpact(impactInfo); } else { if (ImpactType.HitFly != microGHitFlyLogic.GetImpactType()) { StopImpactExcept(obj, ImpactType.MicroGHitFly); microGHitFlyLogic.StopImpact(); microGHitFlyLogic.StartImpact(impactInfo); } } } }
private void SendStiffnessImpact(GameObject obj, ImpactInfo impactInfo) { ImpactMicroGHitFly mircoGHitFly = obj.GetComponent <ImpactMicroGHitFly>(); ImpactStiffness StiffnessLogic = obj.GetComponent <ImpactStiffness>(); if (null != mircoGHitFly && mircoGHitFly.IsAcitve) { if (ImpactType.HitFly != mircoGHitFly.GetImpactType()) { mircoGHitFly.StopImpact(); if (null != StiffnessLogic) { StiffnessLogic.StartImpact(impactInfo); } return; } else { mircoGHitFly.OnStiffness(impactInfo); } return; } ImpactGrab grabLogic = obj.GetComponent <ImpactGrab>(); if (null != grabLogic && grabLogic.IsAcitve) { return; } ImpactHitFly hitFlyLogic = obj.GetComponent <ImpactHitFly>(); ImpactKnockDown KnockDownLogic = obj.GetComponent <ImpactKnockDown>(); // 击飞后端,停止击飞做硬直 if (null != hitFlyLogic && hitFlyLogic.IsAcitve && ImpactType.UnKnown == hitFlyLogic.GetImpactType()) { hitFlyLogic.StopImpact(); if (null != StiffnessLogic) { StiffnessLogic.StartImpact(impactInfo); } return; } // 如果被击飞,只做受击 if (null != hitFlyLogic && hitFlyLogic.IsAcitve && ImpactType.UnKnown != hitFlyLogic.GetImpactType()) { if (null != StiffnessLogic) { hitFlyLogic.OnHitInFly(); return; } } // 击倒前段, 不处理 if (null != KnockDownLogic && KnockDownLogic.IsAcitve && ImpactType.UnKnown != KnockDownLogic.GetImpactType()) { return; } if (null != KnockDownLogic && KnockDownLogic.IsAcitve && ImpactType.UnKnown == KnockDownLogic.GetImpactType()) { KnockDownLogic.StopImpact(); if (null != StiffnessLogic) { StiffnessLogic.StartImpact(impactInfo); return; } } if (null != StiffnessLogic) { StiffnessLogic.StartImpact(impactInfo); } }