modify scripts

This commit is contained in:
2025-10-17 10:59:23 +08:00
parent 9336ed0d6f
commit 4f782a638e
131 changed files with 79880 additions and 3549 deletions

View File

@ -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();

View File

@ -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);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c9c6b14262f434e07ad593f7b28fbfba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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(); });
}
}
}

View File

@ -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;