예제 #1
0
    public void ActText()
    {
        UITextTypeWriterName Nam = Name.GetComponent <UITextTypeWriterName> ();
        UITextTypeWriterDesc Des = Desc.GetComponent <UITextTypeWriterDesc> ();
        UITextTypeWriter     x   = xAct.GetComponent <UITextTypeWriter> ();
        GameObject           act = GameObject.Find("ActMove");
        Item        IScript      = ItemI.GetComponent <Item> ();
        Act         Script       = act.GetComponent <Act> ();
        Animator    TxtAnim      = TextBox.GetComponent <Animator> ();
        BattleFight BF           = AtkDamage.GetComponent <BattleFight> ();

        if (Script.OnActMenuNmb == 0)
        {
            if (NameFinished)
            {
                xAct.enabled = true;
                x.ChangeText("*", 0f);
                Des.ChangeText(Des.text, 0f);
                Desc.enabled = true;
                NameFinished = false;
            }
        }
    }
예제 #2
0
    public void ActMove()
    {
        GameObject            act       = GameObject.Find("ActMove");
        Act                   Script    = act.GetComponent <Act> ();
        UITextTypeWriterName  Nam       = Name.GetComponent <UITextTypeWriterName> ();
        UITextTypeWriterDesc  Des       = Desc.GetComponent <UITextTypeWriterDesc> ();
        UITextTypeWriterDance DanceType = Script.Dance_Text.GetComponent <UITextTypeWriterDance> ();
        UITextTypeWriter      x         = xAct.GetComponent <UITextTypeWriter> ();

        Item IScript = ItemI.GetComponent <Item> ();

        SpriteRenderer SpR     = gameObject.GetComponent <SpriteRenderer> ();
        Animator       TxtAnim = TextBox.GetComponent <Animator> ();

        Attacks Attack = Attacks.GetComponent <Attacks> ();

        if (Script.OnActMenuNmb == 2)          //*Check *Dance
        {
            if (Input.GetAxisRaw("Horizontal") == 1)
            {
                if (gameObject.transform.position == Script.ActPos1.transform.position)
                {
                    if (IScript.NOfClicks > 1)
                    {
                        //if (KeyPressed == false) {
                        gameObject.transform.position = Script.ActPos3.transform.position;

                        //}
                    }
                }
            }
            if (Input.GetAxisRaw("Horizontal") == -1)
            {
                if (gameObject.transform.position == Script.ActPos3.transform.position)
                {
                    if (IScript.NOfClicks > 1)
                    {
                        gameObject.transform.position = Script.ActPos1.transform.position;
                    }
                }
            }
        }



        if (Input.GetAxisRaw("Cancel") == 1)
        {
            if (Script.OnActMenuNmb == 1)                      //Name of enemy

            {
                if (IScript.NOfClicks > 1)
                {
                    gameObject.transform.position = Act1.transform.position;
                    Act1.interactable             = true;
                    Script.OnActMenuNmb           = 0;
                    Act1.enabled = true;
                    Act1.Select();
                    MainMenuTxt Main = GetComponent <MainMenuTxt> ();
                    Main.MainMenTxt();
                }
            }
            if (Script.OnActMenuNmb == 2)                      //*Check and *Dance

            {
                Script.OnActMenuNmb     = 1;
                Script.ActText1.enabled = true;                      //Name of enemy
                Script.Check.enabled    = false;                     //Check
                IScript.NOfClicks       = 1;
                SelectFX.Play();
                Script.XCheck.enabled = false;                       //* in *Check
                Script.Dance.enabled  = false;                       //Dance
                Script.XDance.enabled = false;                       //* in *Dance
            }
        }
        if (Input.GetAxisRaw("Cancel") == 0)
        {
            if (Script.OnActMenuNmb != 0)
            {
            }
        }
        if (Input.GetAxisRaw("Submit") == 1)
        {
            if (IScript.NOfClicks > 1)
            {
                Attack.CancelSpawn = false;
                if (Script.OnActMenuNmb == 1)                          //Name Of Enemy
                {
                    gameObject.transform.position = Script.ActPos1.transform.position;
                    Script.Check.enabled          = true;                   //In Act GameObject//Check
                    Script.XCheck.enabled         = true;                   //* in *Check
                    Script.Dance.enabled          = true;                   //Dance
                    Script.XDance.enabled         = true;                   //* in *Dance
                    Script.ActText1.enabled       = false;                  //Name of enemy
                    IScript.NOfClicks             = 1;
                    SelectFX.Play();
                    Script.OnActMenuNmb = 2;
                }
            }
            if (Script.OnActMenuNmb == 2)                                               //*Check *Dance
            {
                if (gameObject.transform.position == Script.ActPos1.transform.position) //In *Check
                {
                    if (IScript.NOfClicks > 1)
                    {
                        //gameObject.SetActive (false);(Breaks other things)
                        Script.Check.enabled = false;
                        Act1.enabled         = true;
                        Act1.enabled         = false;                       //So the Act button stays uninteractable AND orange
                        Name.enabled         = true;                        //Name part of Check
                        Nam.ChangeText(Nam.text, 0f);
                        Script.OnActMenuNmb   = 0;
                        SpR.enabled           = false;                  //Sprite Render of heart
                        ReadingAct            = true;
                        Script.Dance.enabled  = false;                  //Dance
                        Script.XDance.enabled = false;                  //* in *Dance
                        Script.XCheck.enabled = false;
                        IScript.NOfClicks     = 1;
                    }
                }
                if (gameObject.transform.position == Script.ActPos3.transform.position) //In Dance
                {
                    SpR.enabled                = false;                                 //Sprite Render of heart
                    ReadingDance               = true;
                    Script.OnActMenuNmb        = 0;
                    Script.Check.enabled       = false;
                    Script.Check.enabled       = false;              //In Act GameObject//Check
                    Script.XCheck.enabled      = false;              //* in *Check
                    Script.Dance.enabled       = false;              //Dance
                    Script.XDance.enabled      = false;              //* in *Dance
                    Script.Dance_Text.enabled  = true;               //Dance Text
                    Script.XDance_Text.enabled = true;               //* In Dance Text
                    DanceType.ChangeText(DanceTxt, 0f);
                    IScript.NOfClicks = 1;
                }
            }
        }
        if (Input.GetAxisRaw("Submit") == 0 && Input.GetAxisRaw("Cancel") == 0)
        {
            IScript.NOfClicks = 2;
        }
    }
예제 #3
0
    public void ActTxtPress()
    {
        UITextTypeWriterName Nam = Name.GetComponent <UITextTypeWriterName> ();
        UITextTypeWriterDesc Des = Desc.GetComponent <UITextTypeWriterDesc> ();
        UITextTypeWriter     x   = xAct.GetComponent <UITextTypeWriter> ();
        GameObject           act = GameObject.Find("ActMove");
        Item        IScript      = ItemI.GetComponent <Item> ();
        Act         Script       = act.GetComponent <Act> ();
        Animator    TxtAnim      = TextBox.GetComponent <Animator> ();
        BattleFight BF           = AtkDamage.GetComponent <BattleFight> ();
        //TalkBox
        TalkBox TalkBox = TextBox.GetComponent <TalkBox>();

        if (ReadingAct)
        {
            if (DescFinished)
            {
                if (Input.GetAxisRaw("Submit") == 1)
                {
                    Desc.enabled              = false;    //Desc in check
                    x.enabled                 = false;    //* in Desc(?
                    xAct.enabled              = false;    //* in Name(?
                    Name.enabled              = false;    //Name in check
                    DescFinished              = false;    //If not works forever
                    IScript.NOfClicks         = 1;
                    BF.enabled                = true;
                    BF.enabled                = false;     //Because it works with OnEnable.
                    ReadingAct                = false;
                    TalkBox.TalkBoxTextString = "Ayy lmao.";
                }
            }
            else
            {
                if (Input.GetAxisRaw("Cancel") == 1)
                {
                    Nam.StopAllCoroutines();
                    Des.StopAllCoroutines();
                    Name.text    = Nam.text;
                    Desc.enabled = true;
                    xAct.enabled = true;
                    Desc.text    = Des.text;
                    DescFinished = true;
                }
            }
        }
        if (ReadingDance)
        {
            if (Dance2Finished)
            {
                if (Input.GetAxisRaw("Submit") == 1)
                {
                    IScript.NOfClicks            = 1;
                    Script.Dance_Text.enabled    = false;
                    Script.Dance_Text_2.enabled  = false;
                    Script.XDance_Text.enabled   = false;
                    Script.XDance_Text_2.enabled = false;
                    Script.Suspense.enabled      = false;
                    Dance2Finished = false;
                    BF.enabled     = true;
                    BF.enabled     = false;
                    ReadingDance   = false;
                    DanceNmb      += 1;
                }
            }
            else
            {
                if (Input.GetAxisRaw("Cancel") == 1)
                {
                    UITextTypeWriterSuspense SusType    = Script.Suspense.GetComponent <UITextTypeWriterSuspense> ();
                    UITextTypeWriterDance2   Dance2Type = Script.Dance_Text_2.GetComponent <UITextTypeWriterDance2> ();
                    UITextTypeWriterDance    DanceType  = Script.Dance_Text.GetComponent <UITextTypeWriterDance> ();
                    DanceType.StopAllCoroutines();
                    SusType.StopAllCoroutines();
                    Dance2Type.StopAllCoroutines();
                    IScript.NOfClicks            = 1;
                    Script.Dance_Text.enabled    = true;
                    Script.Dance_Text_2.enabled  = true;
                    Script.XDance_Text.enabled   = true;
                    Script.XDance_Text_2.enabled = true;
                    Script.Suspense.enabled      = true;
                    Script.Dance_Text.text       = DanceTxt;
                    Script.Dance_Text_2.text     = DanceTxt2;
                    Script.Suspense.text         = "...";
                    DanceNmb += 1;
                    Script.XDance_Text.text   = "*";
                    Script.XDance_Text_2.text = "*";
                    Dance2Finished            = true;
                }
            }
        }
    }