public virtual void Enter(sdGameActor _gameActor) { bHasZoomIn = false; if (!bPassive) { _gameActor.spinToTargetDirection(_gameActor.TargetFaceDirection, true); } bAllHitPointDone = false; int id = 0; if (stateData != null) { int sp = (int)stateData["dwCostSP"]; _gameActor.AddSP(-sp); id = (int)stateData["ParentID"]; id = id / 100; if (id == 1002) { _gameActor.gameObject.layer = LayerMask.NameToLayer("NoMonster"); } } AddSkillEffect(_gameActor, HeaderProto.ESkillTimingConditionType.SKILL_TIMING_CONDITION_TYPE_START, 0, skillEffect, null, null, id); CallStateEvent(eStateEventType.eSET_enter); _gameActor.PreviousTime = 0.0f; _gameActor.PreviousAudioTime = 0.0f; _gameActor.PreviousEffectTime = 0.0f; PlayAnim(_gameActor); StartTimer(_gameActor); checkHitPoint(_gameActor); BeginWeaponTrail(_gameActor); if (stateData != null) { //播放自身特效.. object strSelfEffect = stateData["SelfEffect"]; int selfEffectLife = (int)stateData["SelfEffectLife"]; if (strSelfEffect != null && ((string)strSelfEffect).Length != 0) { Transform bone = _gameActor.FindBone("Bip01"); if (bone == null) { bone = _gameActor.transform; } float life = (float)selfEffectLife * 0.001f; sdActorInterface.AddHitEffect((string)strSelfEffect, bone, life, Vector3.zero, true); } } if (_gameActor == sdGameLevel.instance.mainChar) { if (belongToSkill != null && sdUICharacter.Instance != null) { int skillID = belongToSkill.id * 100 + _gameActor.Job; if (belongToSkill.id != 1001) { sdUICharacter.Instance.SetSkillCurStage(actionID, belongToSkill.GetValidActionCount()); } //sdUICharacter.Instance.ShowShortCutCd(skillID); //belongToSkill.startColding(); int cdInterval = belongToSkill.cooldown; sdUICharacter.Instance.SetShortCutCd(skillID, cdInterval, false); sdGameLevel.instance.mainChar.SkillEndTime = float.MaxValue; } } PlayDieAudio(_gameActor); _gameActor.RunLFootAudioEnable = true; _gameActor.RunRFootAudioEnable = true; }