Beispiel #1
0
    private void MoveActiveBall(Vector3Int finish)
    {
        Vector3Int start = _activeBall.GetGameCoords();

        SwapBall(start, finish);
        _activeBall.Move(finish);

        _activeBall.SetUnActive();
        _activeBall = null;
    }
Beispiel #2
0
    public void BallClicked(BallReady ball)
    {
        Debug.Log("Контроллер получил шар");
        if (_activeBall)
        {
            _activeBall.SetUnActive();
        }

        if (_activeBall == ball)
        {
            _activeBall = null;
        }
        else
        {
            _activeBall = ball;
            _activeBall.SetActive();
        }
    }