modify scripts
This commit is contained in:
@ -34,6 +34,7 @@ namespace WordsToolkit.Scripts.GUI.Buttons.Boosts
|
||||
|
||||
private CanvasGroup canvasGroup;
|
||||
private bool isActive;
|
||||
private bool isAnimating;
|
||||
|
||||
|
||||
protected override void OnEnable()
|
||||
@ -79,6 +80,12 @@ namespace WordsToolkit.Scripts.GUI.Buttons.Boosts
|
||||
|
||||
protected void OnClick()
|
||||
{
|
||||
// Prevent clicks during animation
|
||||
if (isAnimating)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (isActive)
|
||||
{
|
||||
Refund();
|
||||
@ -105,6 +112,7 @@ namespace WordsToolkit.Scripts.GUI.Buttons.Boosts
|
||||
|
||||
protected virtual void ActivateBoost(bool hideButtons = true)
|
||||
{
|
||||
isAnimating = true;
|
||||
UpdatePriceDisplay();
|
||||
if(hideButtons)
|
||||
buttonViewController.HideOtherButtons(this);
|
||||
@ -117,6 +125,7 @@ namespace WordsToolkit.Scripts.GUI.Buttons.Boosts
|
||||
protected virtual void DeactivateBoost()
|
||||
{
|
||||
isActive = false;
|
||||
isAnimating = false;
|
||||
buttonViewController.ShowButtons();
|
||||
waves.Clear();
|
||||
waves.Stop();
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Settings;
|
||||
|
||||
namespace WordsToolkit.Scripts.GUI.Labels
|
||||
{
|
||||
public class IAPDisabler : MonoBehaviour
|
||||
{
|
||||
private void OnEnable()
|
||||
{
|
||||
var gameSettings = Resources.Load<GameSettings>("Settings/GameSettings");
|
||||
if (gameSettings != null && !gameSettings.enableInApps)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9c6b14262f434e07ad593f7b28fbfba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -10,6 +10,7 @@
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
@ -65,11 +66,7 @@ namespace WordsToolkit.Scripts.GUI
|
||||
|
||||
public void ShowLanguageSelector()
|
||||
{
|
||||
menuManager.CloseAllPopups();
|
||||
menuManager.ShowPopup<LanguageSelectionGame>(null, result =>
|
||||
{
|
||||
UpdateText();
|
||||
});
|
||||
menuManager.ShowPopup<LanguageSelectionGame>(null, result => { UpdateText(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -23,12 +23,6 @@ namespace WordsToolkit.Scripts.GUI.Tutorials
|
||||
{
|
||||
public class TutorialWordSubstitution : TutorialPopupBase
|
||||
{
|
||||
[Inject]
|
||||
protected LevelManager levelManager;
|
||||
|
||||
[Inject]
|
||||
protected GameManager gameManager;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject hand;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user