You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Scripts/Dev/LevelSelectionUI.cs

19 lines
520 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using D2D.Databases;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class LevelSelectionUI : MonoBehaviour
{
[SerializeField] private GameProgressionDatabase gameProgressionDatabase;
public void OnButtonClicked(int level)
{
gameProgressionDatabase.PassedLevels.Value = level == -1 ? 0 : level;
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}