public override void Reason(E_ActionType actionType) { bool skillIsOut = mBear.CurrentStepSkillIsOut(); if (skillIsOut) { mBear.NexStep(); } else { if (mReached) { mBear.UseSkill(); } } }
public override void Reason(E_ActionType actionType) { if (mBear.isDead) { mFSMSystem.PerformTransition(BearTransition.NoHealth); return; } if (mTimer >= 2.0f) { if (mBear.IsStep1()) { bool skillIsOut = mBear.CurrentStepSkillIsOut(); if (!skillIsOut) { mBear.UseSkill(); return; } else { mBear.NexStep(); } } if (mBear.IsStep3()) { bool skillIsOut = mBear.CurrentStepSkillIsOut(); if (skillIsOut) { if (!ioo.cameraManager.CPAIsPlaying) { mBear.NexStep(); } else { return; } } } if (mBear.IsStep4() || mBear.IsStep6()) { bool skillIsOut = mBear.CurrentStepSkillIsOut(); if (skillIsOut) { mBear.NexStep(); ioo.cameraManager.PlayCPA(); } else { if (mBear.UseSkillImmediately()) { mBear.UseSkill(); return; } else { float distance = Vector3.Distance(mCharacter.position, ioo.cameraManager.position); if (distance < 2.0f) { mBear.UseSkill(); return; } } } } Vector3 direction = ioo.cameraManager.position - mBear.position; if (direction.magnitude > 4.0f) { mFSMSystem.PerformTransition(BearTransition.SeaEnemy); } } }