public override void DoBeforeEntering() { mBear = mCharacter as Bear; mBear.FollowSpeed(); string name = ""; if (mBear.IsStep3()) { name = "WaitPoint0"; } else { name = "WaitPoint1"; } mTargetPos = GameObject.Find(name).transform.position; mFollowType = E_Follow.FollowCamera; }
public override void Act(E_ActionType actionType) { Vector3 pos = Vector3.zero; if (mFollowType == E_Follow.FollowCamera) { mBear.NMAMove(); if (Vector3.Distance(mTargetPos, mCharacter.position) <= 2.0f) { mFollowType = E_Follow.ToTarget; } } else if (mFollowType == E_Follow.ToTarget) { mBear.MoveToTarget(mTargetPos, out pos); } mDistance = Vector3.Distance(pos, mCharacter.position); }