public override void Act(E_ActionType actionType) { mNormalTimer = mCharacter.AnimNormalizedTime("firecricle"); mAnimisOver = mCharacter.AnimIsOver("firecricle"); if (mNormalTimer < 0.7f) { if (!mBulldemonKing.IsInvincible) { mBeBreaked = true; mBulldemonKing.OnSkillBreaked(); } } else { if (mBulldemonKing.IsInvincible) { // 回复正常播放动画速度 mCharacter.AnimSpeed(1.0f); // 清除射击点 EventDispatcher.TriggerEvent(EventDefine.Event_DisActive_HitPoint); } if (mAnimisOver) { // 相机震动 ioo.cameraManager.BossShortShake(); mBulldemonKing.CrashPoint.AddScreenCrash(); // 对玩家造成伤害 int[] args = new int[] { -1, mCharacter.attr.baseAttr.id, mCharacter.attr.baseAttr.damageValue }; ioo.gameEventSystem.NotifySubject(GameEventType.PlayerOnDamage, args); } } }
public override void Act(E_ActionType actionType) { if (mWaittingTimer > 0) { mWaittingTimer -= Time.deltaTime; return; } mReached = mCharacter.MoveStraight(mTargetPos); mCharacter.LookAtCamera(); if (mReached) { // 现将启动射击点消息发出去,在下一帧在对射击点进行检测 if (!mEvnetIsDispatchered) { mEvnetIsDispatchered = true; mBulldemonKing.ReachForward(); mCharacter.AnimSpeed(0.1f); EventDispatcher.TriggerEvent(EventDefine.Event_Bull_Demon_King_Use_Skill_OX_Horn); } else { mLastTimer += Time.deltaTime; //mAnimNormal = mCharacter.AnimNormalizedTime("oxhorn1"); if (mLastTimer > 3.0f) { // 回复正常播放动画速度 mCharacter.AnimSpeed(1.0f); // 清除射击点 EventDispatcher.TriggerEvent(EventDefine.Event_DisActive_HitPoint); // 相机震动 ioo.cameraManager.BossShortShake(); mBulldemonKing.CrashPoint.AddScreenCrash(); // 对玩家造成伤害 int[] args = new int[] { -1, mCharacter.attr.baseAttr.id, mCharacter.attr.baseAttr.damageValue }; ioo.gameEventSystem.NotifySubject(GameEventType.PlayerOnDamage, args); } else { if (!mBulldemonKing.IsInvincible) { mBeBreaked = true; mBulldemonKing.OnSkillBreaked(); } } } } }