public virtual void ChangeDirection() { if (action == CharacterActionsEnum.run) { RunEnd(); } if (changeDirectionToBack) { moveToDirection3D.ChangeDirection(DirectionsChanges3D.RandomDirectionGrounded(moveToDirection3D.direction)); } else { moveToDirection3D.ChangeDirection(DirectionsChanges3D.RandomDirectionGrounded90Degrees(moveToDirection3D.direction)); } transform.position = new Vector3(Mathf.Round(transform.position.x), transform.position.y, Mathf.Round(transform.position.z)); }
public virtual void PushStart() { doingSkill = true; animator.SetBool(hashAnimator.push, true); pushCube.StartPushing(this); moveToDirection3D.speed = pushSpeed; pushCubeMovement.ChangeDirection(moveToDirection3D.direction); pushCubeMovement.speed = pushSpeed; pushCubeMovement.StartMoving(); }