示例#1
0
 private void InitialiseBanks(GameObject g, GameObject d, GameObject e, GameObject p, GameObject y)
 {
     goldB    = g.GetComponent <BankScript>();
     dollarsB = d.GetComponent <BankScript>();
     eurosB   = e.GetComponent <BankScript>();
     poundsB  = p.GetComponent <BankScript>();
     yensB    = y.GetComponent <BankScript>();
     SetInitialAmount(goldB, dollarsB, eurosB, poundsB, yensB);
 }
示例#2
0
        private void OnEnable()
        {
            GetComponent <RectTransform>().localScale = Vector3.zero;
            LeanTween.scale(GetComponent <RectTransform>(), new Vector3(0.5f, 0.5f, 1), 0.2f);
            if (_bankScript == null)
            {
                _bankScript = GameObject.Find("Bank").GetComponent <BankScript>();
                GameManager.GetEventHandler().onLightShardsStoredInBank.AddListener(OnLightShardsChanged);
            }

            shardsOnPlayer.text = GameManager.GetPlayerScript().GetPlayerInventory().GetLightShardAmount().ToString();
            shardsInBank.text   = _bankScript.GetStoredLightShards().ToString();
        }
示例#3
0
 private void SetInitialAmount(BankScript g, BankScript d, BankScript e, BankScript p, BankScript y)
 {
     g.amount = INITIAL_GOLD * playerCount;
     d.amount = e.amount = p.amount = y.amount = INITIAL_CURRENCIES * playerCount;
     SetTextAndInitialProperty(g.amount, d.amount, e.amount, p.amount, y.amount, myPlayer.IsMasterClient);
 }