Exemplo n.º 1
0
    public void ItemText()
    {
        UITextTypeWriter        x1Type      = x1.GetComponent <UITextTypeWriter> ();
        UITextTypeWriterX2      x2Type      = x2.GetComponent <UITextTypeWriterX2> ();
        UITextTypeWriterItem1   Item1_1Type = Item1_1.GetComponent <UITextTypeWriterItem1> ();
        UITextTypeWriterItem1_2 Item1_2Type = Item1_2.GetComponent <UITextTypeWriterItem1_2> ();


        if (Item1Finished)
        {
            x2Type.ChangeText("*", 0f);
            x2.enabled    = true;
            Item1Finished = false;
        }
        if (X2Finished)
        {
            Item1_2Type.ChangeText(Item1_2Type.Item1_2Txt, 0f);
            Item1_2.enabled = true;
            X2Finished      = false;
        }
    }
Exemplo n.º 2
0
    public void Submit()
    {
        Item             Script   = ItemS.GetComponent <Item> ();
        HeartMove        Pos      = Heart.GetComponent <HeartMove> ();
        PlayerHealth     Health   = Heart.GetComponent <PlayerHealth> ();
        UITextTypeWriter MainType = MainTxt.GetComponent <UITextTypeWriter> ();

        UITextTypeWriter      x1Type      = x1.GetComponent <UITextTypeWriter> ();
        UITextTypeWriterX2    x2Type      = x2.GetComponent <UITextTypeWriterX2> ();
        UITextTypeWriterItem1 Item1_1Type = Item1_1.GetComponent <UITextTypeWriterItem1> ();
        UITextTypeWriter      Item1_2Type = Item1_2.GetComponent <UITextTypeWriter> ();



        if (AxisUsed == true)
        {
            MainType.StopAllCoroutines();

            if (Pos.HeartPos == 1 && Script.Item1Pos == 1 || Pos.HeartPos == 2 && Script.Item1Pos == 2 || Pos.HeartPos == 3 && Script.Item1Pos == 3 || Pos.HeartPos == 4 && Script.Item1Pos == 4)
            {
                if (Script.NOfClicks > 1)
                {
                    if (Input.GetAxisRaw("Submit") != 0)
                    {
                        MainType.StopAllCoroutines();
                        IsItem1         = true;
                        Health.PHealth += 10;
                        Script.Item1Pos = 0;
                        x1.enabled      = true;
                        Item1_1Type.ChangeText(Item1_1Type.Item1Txt, 0f);
                        Item1_1.enabled = true;
                        ItemTxtOn       = true;
                        ItemExit();
                    }
                }
            }


            if (Pos.HeartPos == 2 && Script.Item2Pos == 2 || Pos.HeartPos == 1 && Script.Item2Pos == 1 || Pos.HeartPos == 3 && Script.Item2Pos == 3 || Pos.HeartPos == 4 && Script.Item2Pos == 4)
            {
                if (Script.NOfClicks > 1)
                {
                    if (Input.GetAxisRaw("Submit") != 0)
                    {
                        MainType.StopAllCoroutines();
                        IsItem2         = true;
                        Health.PHealth += 10;
                        Script.Item2Pos = 0;
                        //At Least for now, they all have the same descriptions(Applies for all the other items right now)
                        x1.enabled = true;
                        Item1_1Type.ChangeText(Item1_1Type.Item1Txt, 0f);
                        Item1_1.enabled = true;
                        ItemTxtOn       = true;
                        ItemExit();
                    }
                }
            }
            if (Pos.HeartPos == 3 && Script.Item3Pos == 3 || Pos.HeartPos == 1 && Script.Item3Pos == 1 || Pos.HeartPos == 2 && Script.Item3Pos == 2 || Pos.HeartPos == 4 && Script.Item3Pos == 4)
            {
                if (Script.NOfClicks > 1)
                {
                    if (Input.GetAxisRaw("Submit") != 0)
                    {
                        MainType.StopAllCoroutines();
                        IsItem3         = true;
                        Health.PHealth += 10;
                        Script.Item3Pos = 0;
                        //At Least for now, they all have the same descriptions(Applies for all the other items right now)
                        x1.enabled = true;
                        Item1_1Type.ChangeText(Item1_1Type.Item1Txt, 0f);
                        Item1_1.enabled = true;
                        ItemTxtOn       = true;
                        ItemExit();
                    }
                }
            }

            if (Pos.HeartPos == 4 && Script.Item4Pos == 4 || Pos.HeartPos == 1 && Script.Item4Pos == 1 || Pos.HeartPos == 2 && Script.Item4Pos == 2 || Pos.HeartPos == 3 && Script.Item4Pos == 3)
            {
                if (Script.NOfClicks > 1)
                {
                    if (Input.GetAxisRaw("Submit") != 0)
                    {
                        MainType.StopAllCoroutines();
                        IsItem4         = true;
                        Health.PHealth += 10;
                        Script.Item4Pos = 0;
                        //At Least for now, they all have the same descriptions(Applies for all the other items right now)
                        x1.enabled = true;
                        Item1_1Type.ChangeText(Item1_1Type.Item1Txt, 0f);
                        Item1_1.enabled = true;
                        ItemTxtOn       = true;
                        ItemExit();
                    }
                }
            }
        }
    }