Example #1
0
 // Use this for initialization
 void Start()
 {
     GetComponent <Image>().color = new Color(1, 1, 1, 0);
     SellUi      = GameObject.FindGameObjectWithTag("SellUi").GetComponent <SellUiScript>();
     BuyUi       = GameObject.FindGameObjectWithTag("BuyUi").GetComponent <BuyUiScript>();
     InventoryUi = GameObject.FindGameObjectWithTag("InventoryUi").GetComponent <InventoryUiScript>();
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     BuyUi       = GameObject.FindGameObjectWithTag("BuyUi").GetComponent <BuyUiScript>();
     ItemManager = GameObject.FindGameObjectWithTag("ItemManager").GetComponent <ItemManager>();
     RegisterItems();
     RefreshShop();
 }
Example #3
0
 // Update is called once per frame
 void Update()
 {
     if (SellUi == null && GameObject.FindGameObjectWithTag("SellUi") != null)
     {
         SellUi = GameObject.FindGameObjectWithTag("SellUi").GetComponent <SellUiScript>();
     }
     if (BuyUi == null && GameObject.FindGameObjectWithTag("BuyUi") != null)
     {
         BuyUi = GameObject.FindGameObjectWithTag("BuyUi").GetComponent <BuyUiScript>();
     }
     if (DialogUi.GetComponent <Canvas>().enabled)
     {
         InDialog = true;
     }
     else
     {
         InDialog = false;
     }
     if (InDialog && Input.GetKeyDown("c"))
     {
         Skip();
     }
     if (InDialog && currdialog != null)
     {
         if (GoNext && DialogIndex >= currdialogs.Length)
         {
             EndDialog();
         }
     }
 }