示例#1
0
    private void SelectNextTarget()
    {
        if (targetStation != null)
        {
            homeStation = targetStation;
        }

        SNKSpaceStation temp = homeStation;

        while (temp == homeStation)
        {
            temp = stationSpawner.GetRandomStation();
        }
        targetStation = temp;
    }
示例#2
0
    public void StartMoving(SNKSpaceStation home)
    {
        speed = 3f;
        rigid = GetComponent <Rigidbody2D>();

        stationSpawner = FindObjectOfType <SNKSpaceStationSpawner>();

        if (homeStation != null)
        {
            homeStation.ShipCount--;
        }
        homeStation = home;
        SelectNextTarget();
        StartCoroutine(WaitThenMove());
    }
示例#3
0
 private void GoHome()
 {
     targetStation = homeStation;
     MoveToTarget();
 }