public void SetDeviceSide(int i_Index, tnUI_MP_DeviceSide i_Side, bool i_Immediatly = false)
 {
     if (viewInstance != null)
     {
         viewInstance.SetDeviceSide(i_Index, i_Side, i_Immediatly);
     }
 }
Esempio n. 2
0
    public void SetDeviceSide(tnUI_MP_DeviceSide i_Side, bool i_Immediatly)
    {
        if (!m_IsActive)
        {
            return;
        }

        if (i_Side != m_CurrentSide)
        {
            m_CurrentSide = i_Side;

            CancelCoroutine();

            SfxPlayer.PlayMain(m_Move_Sfx);

            if (!i_Immediatly)
            {
                m_CurrentCorroutine = MoveDevice();
                StartCoroutine(m_CurrentCorroutine);
            }
            else
            {
                Vector2 targetPosition = GetIdealPosition();
                Internal_SetDeviceAnchoredPosition(targetPosition);
            }
        }
    }
Esempio n. 3
0
    public void SetDeviceSide(int i_Index, tnUI_MP_DeviceSide i_Side, bool i_Immediatly = false)
    {
        tnUI_MP_Device device = GetDevice(i_Index);

        if (device != null)
        {
            device.SetDeviceSide(i_Side, i_Immediatly);
        }
    }
Esempio n. 4
0
    // LOGIC

    public void ForceDeviceSide(tnUI_MP_DeviceSide i_Side)
    {
        m_CurrentSide = i_Side;

        CancelCoroutine();

        Vector2 targetPosition = GetIdealPosition();

        Internal_SetDeviceAnchoredPosition(targetPosition);
    }