private void OnEnable()
 {
     creater = (PathCreater)target;
     if (creater.path == null)
     {
         creater.CreatePath();
     }
 }
Beispiel #2
0
    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));
        }
    }
Beispiel #3
0
 private void Awake()
 {
     battleStage = CompornentUtility.FindCompornentOnScene <BattleStage>();
     pathCreater = CompornentUtility.FindCompornentOnScene <PathCreater>();
 }