Added "Go to Screen" option for HSS and VSS by request

--HG--
branch : develop_5.3
pull/413/head
Simon (darkside) Jackson 2016-05-23 21:10:17 +01:00
parent 2d3b348825
commit 2b0c2d805a
2 changed files with 24 additions and 0 deletions

View File

@ -139,6 +139,18 @@ namespace UnityEngine.UI.Extensions
}
}
//Function for switching to a specific screen
public void GoToScreen(int screenIndex)
{
if (screenIndex <= _screens && screenIndex >= 0)
{
_lerp = true;
_lerp_target = _positions[screenIndex];
ChangeBulletsInfo(screenIndex);
}
}
//Because the CurrentScreen function is not so reliable, these are the functions used for swipes
private void NextScreenCommand()
{

View File

@ -137,6 +137,18 @@ namespace UnityEngine.UI.Extensions
}
}
//Function for switching to a specific screen
public void GoToScreen(int screenIndex)
{
if (screenIndex <= _screens && screenIndex >= 0)
{
_lerp = true;
_lerp_target = _positions[screenIndex];
ChangeBulletsInfo(screenIndex);
}
}
//Because the CurrentScreen function is not so reliable, these are the functions used for swipes
private void NextScreenCommand()
{