Exemple #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        // If the spider touched the line on the first descent
        if (_wovenThreadsNumber == 0)
        {
            if (!_firstPointReached)
            {
                FinishWeawing();
                ReachedFirstPoint();
            }

            _currentThread.Attach(_currentThread.GetLastPointNumber(), collision.contacts[0].point);
            _currentThread.SetSpiderIsAttached(false);
            _wovenThreadsNumber++;

            return;
        }
    }