Exemple #1
0
 void Awake()
 {
     menuScript = GetComponent <Mockup_Menu>();
     if (menuScript == null)
     {
         Debug.LogError("All global scripts needs to be inside the same object!");
     }
 }
Exemple #2
0
 void Awake()
 {
     menuScript = GetComponent <Mockup_Menu>();
     if (menuScript == null)
     {
         Debug.LogError("All global scripts needs to be inside the same object!");
     }
     sessionData = GameObject.FindWithTag("SessionData").GetComponent <SessionData>();
 }
Exemple #3
0
    public void Setup()
    {
        string sceneName = SceneManager.GetActiveScene().name;

        if (sceneName == "Menu Product")
        {
            menuScript = GetComponent <Mockup_Menu>();
            LoadProductDetail();
        }
        else if (sceneName == "Menu Katalog")
        {
            string filename = productAttr.name.Replace(" ", string.Empty);
            productCatalogItems.productImage.sprite = SessionData.GetSprite(filename);
            productCatalogItems.productName.text    = productAttr.name;
            productCatalogItems.productPrice.text   = productAttr.price.ToString("0,0");
        }
    }
Exemple #4
0
 void Start()
 {
     menuScript  = GetComponent <Mockup_Menu>();
     sessionData = GameObject.FindWithTag("SessionData").GetComponent <SessionData>();
     InitCart();
 }
Exemple #5
0
 void Awake()
 {
     menuScript = GetComponent <Mockup_Menu>();
 }