Esempio n. 1
0
    public IEnumerator SetBombModules(string mods)
    {
        if (!int.TryParse(mods, out int moduleCount))
        {
            yield break;
        }

        FreeplaySettings currentSettings = FreeplayDevice.CurrentSettings;
        int          currentModuleCount  = currentSettings.ModuleCount;
        KeypadButton button           = moduleCount > currentModuleCount ? FreeplayDevice.ModuleCountIncrement : FreeplayDevice.ModuleCountDecrement;
        Selectable   buttonSelectable = button.GetComponent <Selectable>();

        for (int hitCount = 0; hitCount < Mathf.Abs(moduleCount - currentModuleCount); ++hitCount)
        {
            int lastModuleCount = currentSettings.ModuleCount;
            SelectObject(buttonSelectable);
            yield return(new WaitForSeconds(0.01f));

            if (lastModuleCount == currentSettings.ModuleCount)
            {
                yield break;
            }
        }
    }
Esempio n. 2
0
    public void StartBomb()
    {
        KeypadButton startButton = FreeplayDevice.StartButton;

        SelectObject(startButton.GetComponent <Selectable>());
    }