Beispiel #1
0
    void nextStage()
    {
        switch (index)
        {
        case 0:                 // highlight top right
        case 1:
            gameObject.GetComponentInChildren <Text>().text                         = tutorialText[index];
            GameObject.Find("Money").gameObject.transform.localScale                = new Vector3(1, 1, 1);
            GameObject.Find("Day").gameObject.transform.localScale                  = new Vector3(1, 1, 1);
            GameObject.Find("Lives").gameObject.transform.localScale                = new Vector3(1, 1, 1);
            GameObject.Find("Progress Button").gameObject.transform.localScale      = new Vector3(1, 1, 1);
            GameObject.Find("Progress Button").GetComponent <Button>().interactable = false;
            GameObject.Find("DayHighlight").gameObject.transform.localScale         = new Vector3(0.5f, 0.5f, 1);
            index++;
            break;

        case 2:                 // highlight recap panel
            gameObject.GetComponentInChildren <Text>().text                   = tutorialText[index];
            GameObject.Find("Receipt").gameObject.transform.localScale        = new Vector3(1, 1, 1);
            GameObject.Find("DayHighlight").gameObject.transform.localScale   = new Vector3(0, 0, 0);
            GameObject.Find("RecapHighlight").gameObject.transform.localScale = new Vector3(0.5f, 0.5f, 1);
            index++;
            break;

        case 3:                 // highlight supply
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            GameObject.Find("RecapHighlight").gameObject.transform.localScale   = new Vector3(0, 0, 0);
            GameObject.Find("StorageHighlight").gameObject.transform.localScale = new Vector3(0.5f, 0.5f, 1);
            foreach (Transform child in GameObject.Find("Inventory").gameObject.transform)
            {
                //child.localScale = new Vector3(1, 1, 1);
                child.gameObject.SetActive(true);
            }
            foreach (Transform child in GameObject.Find("ProjectedInventory").gameObject.transform)
            {
                //child.localScale = new Vector3(1, 1, 1);
                child.gameObject.SetActive(true);
            }
            GameObject.FindObjectOfType <Panels>().UpdateProjected();
            index++;
            break;

        case 4:                 // highlight spoilage rate and limit
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            GameObject.Find("StorageHighlight").gameObject.transform.localScale  = new Vector3(0, 0, 0);
            GameObject.Find("SpoilageHighlight").gameObject.transform.localScale = new Vector3(0.5f, 0.5f, 1);
            GameObject.Find("Upgrade Storage").gameObject.transform.localScale   = new Vector3(1, 1, 1);
            index++;
            break;

        case 5:                 // show order
            GameObject.Find("SpoilageHighlight").gameObject.transform.localScale = new Vector3(0, 0, 0);
            GameObject.Find("OrderHighlight").gameObject.transform.localScale    = new Vector3(0.5f, 0.5f, 1);
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            wm.GenerateNewOrder(wm.Orders[0]);
            GameObject.Find("IncomingOrdersTitle").gameObject.transform.localScale = new Vector3(1, 1, 1);
            break;

        case 6:                 // highlight attributes of an order
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            break;

        case 7:     // highlight buy menu
            GameObject.Find("OrderHighlight").gameObject.transform.localScale = new Vector3(0, 0, 0);
            GameObject.Find("BuyHighlight").gameObject.transform.localScale   = new Vector3(0.5f, 0.5f, 1);
            if (wm.Orders[0].Fulfilled)
            {
                wm.UnstageOrder(wm.Orders[0]);
            }
            wm.Orders[0].active = false;
            wm.Orders[0].transform.localScale = new Vector3(0, 0, 0);
            GameObject.Find("OrderSupplyMenu").gameObject.transform.localScale = new Vector3(1, 1, 1);
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            break;

        case 8:
            GameObject.Find("BuyHighlight").gameObject.transform.localScale      = new Vector3(0, 0, 0);
            GameObject.Find("ComputerHighlight").gameObject.transform.localScale = new Vector3(0.5f, 0.5f, 1);
            GameObject.Find("Laptop").gameObject.transform.localScale            = new Vector3(1, 1, 1);
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            break;

        case 9:
            GameObject.Find("InventoryBook").gameObject.transform.localScale = new Vector3(2, 2, 2);
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            break;

        case 10:
            GameObject.Find("ComputerHighlight").gameObject.transform.localScale = new Vector3(0, 0, 0);
            PlayGame();
            break;

        default:                 // otherwise just show tutorial text
            gameObject.GetComponentInChildren <Text>().text = tutorialText[index];
            index++;
            break;
        }
    }