Ejemplo n.º 1
0
    private void HandleFavoritesInput()
    {
        // Selecting a favorite
        for (int i = 0; i < numberKeys.Length; i++)
        {
            numberKeys[i].Update();
            if (numberKeys[i].JustPressedDown)
            {
                // Saving a favorite to the selected number key
                if (settings.SavingFavoriteActive)
                {
                    settings.SavingFavoriteActive = false;
                    objPlacer.SaveCurrentHexMeshToFavorites(i);
                }
                // Changing to the favorited hex mesh
                else
                {
                    objPlacer.SelectFavoriteHexMesh(i);
                }
            }
        }

        // De/activating the favorite saving mode
        saveFavoriteInput.Update();
        if (saveFavoriteInput.JustPressedDown)
        {
            settings.SavingFavoriteActive = !settings.SavingFavoriteActive;

            if (settings.SavingFavoriteActive)
            {
                Debug.Log("Saving favorite...");
            }
            else
            {
                Debug.Log("Saving favorite cancelled");
            }
        }
    }