Ejemplo n.º 1
0
    public void StickSelected(Stick stick)
    {
        if (m_FirstSelectedStick != null && stick == m_FirstSelectedStick && !m_HasGrabbedRing)
        {
            return;
        }

        SetStick(stick);

        if (m_FirstSelectedStick.CheckTopRing() == null)
        {
            ResetSelected();
            return;
        }
        else
        {
            if (m_FirstSelectedStick && m_SecondSelectedStick)
            {
                if (RingCanBeAdded())
                {
                    //Debug.Log("Allowed");

                    Ring ringOnTop = m_FirstSelectedStick.RemoveTopRing();
                    m_SecondSelectedStick.AddRing(ringOnTop, m_StickBottom.position);
                }

                ResetSelected();
                CheckForWin();
            }
        }
    }