using game; using UnityEngine; using UnityEngine.UI; namespace RND { public class TestPlayWindow : ParameterlessWindow { [SerializeField] private Button loseButton; [SerializeField] private Button winButton; [SerializeField] private Button chestWindow; [SerializeField] private Button offline; [SerializeField] private Button daily; protected override void OnInit() { loseButton.onClick.AddListener(ShowLose); winButton.onClick.AddListener(ShowWin); chestWindow.onClick.AddListener(ShowChest); offline.onClick.AddListener(ShowOffline); daily.onClick.AddListener(ShowDaily); } private void ShowLose() { Close(); UI.Show(); } private void ShowWin() { Close(); UI.Show(); } private void ShowChest() { Close(); Save.Inventory.RemoveConsumableItem(EnumConsumable.KEY, Save.Inventory.GetConsumableItemAmount(EnumConsumable.KEY)); Save.Inventory.AddConsumableItem(EnumConsumable.KEY, 3); UI.Show(new ChestsGenerator()); } private void ShowOffline() { Close(); UI.Show(Random.Range(0, 300)); } private void ShowDaily() { Close(); UI.Show( new DailyReward(G.Instance.Configs.Get("@time_rewards/daily_reward"))); } } }