Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     continueText.SetText("Continue as " + PlayerPrefs.GetString("user"));
     continueText.SetAllDirty();
     button = GetComponent <LeanButton>();
     button.OnClick.AddListener(OnClick);
 }
Ejemplo n.º 2
0
    void Start()
    {
        priceText         = transform.Find("Item Cost").GetComponent <TextMeshProUGUI>();
        currentStatsText  = transform.Find("Current Stats").GetComponent <TextMeshProUGUI>();
        nextStatsText     = transform.Find("Next Stats").GetComponent <TextMeshProUGUI>();
        upgradeButton     = transform.Find("Upgrade Button (LeanButton)").GetComponent <LeanButton>();
        upgradeButtonText = transform.Find("Upgrade Button (LeanButton)/Cap/Text").GetComponent <TextMeshProUGUI>();
        rubiesDisplay     = FindObjectOfType <Rubies>();

        UpdateTexts();
    }
Ejemplo n.º 3
0
        public void EmitBuy(LeanButton sender)
        {
            // O(n)だけど無視
            foreach (var b in wishlists)
            {
                if (b.button != sender)
                {
                    continue;
                }

                // お金を消費して欲しいものリストからのお金として登録
                if (m_gc.Model.Player.Coins >= b.price)
                {
                    m_gc.Model.Bias.MoneyFromWishlist += b.price;
                    m_gc.Model.Player.Coins           -= b.price;
                }
            }
        }
Ejemplo n.º 4
0
        public void EmitSuperchat(LeanButton sender)
        {
            // O(n)だけど無視
            foreach (var b in superChatButtons)
            {
                if (b.button != sender)
                {
                    continue;
                }

                if (m_gc.Model.Player.Coins >= b.budget)
                {
                    m_gc.Model.Bias.MoneyFromSuperchat += b.budget;
                    m_gc.Model.Player.Coins            -= b.budget;
                    m_factory.EmitSuperchat(b.budget);
                }

                ActivateSuperchatButton();

                return;
            }
        }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     button = GetComponent <LeanButton>();
     button.OnClick.AddListener(OnClick);
 }
Ejemplo n.º 6
0
 private void Start()
 {
     button = this.GetComponent <LeanButton> ();
 }