private void OnEnable() { creater = (PathCreater)target; if (creater.path == null) { creater.CreatePath(); } }
public void MoveToPoint(Point2 _point) { if (isMoving) { return; } PathCreater pathCre = CompornentUtility.FindCompornentOnScene <PathCreater>(); var path = pathCre.GetPath(myUnit.pos, _point, myUnit.GetMaxUnitStatus.stepHeight); if (path != null) { myUnit.pos = _point; myUnit.StartCoroutine(MoveRoutine(path)); } }
private void Awake() { battleStage = CompornentUtility.FindCompornentOnScene <BattleStage>(); pathCreater = CompornentUtility.FindCompornentOnScene <PathCreater>(); }