Esempio n. 1
0
    public void MercyMove()
    {
        Mercy       MercyScript = MercyMoveScript.GetComponent <Mercy> ();
        GameObject  item        = GameObject.Find("ItemMove");
        Item        IScript     = item.GetComponent <Item> ();
        GameObject  act         = GameObject.Find("ActMove");
        Act         Script      = act.GetComponent <Act> ();
        BattleFight BF          = AtkDamage.GetComponent <BattleFight> ();
        Attacks     Attack      = Attacks.GetComponent <Attacks> ();

        if (Spareable)
        {
            MercyScript.MercyTxt.color = yellow;
        }


        if (MercyScript.OnMercyMenu)
        {
            if (Input.GetAxisRaw("Cancel") == 1)
            {
                gameObject.transform.position = Mercy1.transform.position;
                Mercy1.enabled      = true;
                Mercy1.interactable = true;
                MercyTxt.enabled    = false;
                Mercy1.Select();
                MainMenuTxt Main = GetComponent <MainMenuTxt> ();
                Main.MainMenTxt();
                MercyScript.OnMercyMenu = false;
                Script.OnActMenuNmb     = 0;
                IScript.OnItemMenu      = false;
            }

            if (Input.GetAxisRaw("Submit") == 1)
            {
                if (IScript.NOfClicks > 1)
                {
                    if (Spareable == false)
                    {
                        Attack.CancelSpawn           = false;
                        MercyScript.MercyTxt.enabled = false;
                        Mercy1.enabled          = true;
                        Mercy1.enabled          = false;
                        Mercy1.interactable     = false;
                        MercyScript.OnMercyMenu = false;
                        BF.enabled        = true;
                        BF.enabled        = false;                 //Battle Fight works on Enable
                        IScript.NOfClicks = 1;
                    }
                    else if (Spareable)
                    {
                        FadeToBlackAnim.Play("FadeToBlack");
                    }
                }
            }
        }
    }
Esempio n. 2
0
    IEnumerator BattleDuration(float duration)
    {
        yield return(new WaitForSeconds(duration));

        UITextTypeWriter  Type   = gameObject.GetComponent <UITextTypeWriter> ();
        MainMenuTxt       MenTxt = Heart.GetComponent <MainMenuTxt> ();
        TalkBox           TalkB  = gameObject.GetComponent <TalkBox> ();//TalkBox
        MainMenuTxt       Main   = Heart.GetComponent <MainMenuTxt> ();
        HitSound          Hs     = Atk_0.GetComponent <HitSound> ();
        ItemUsage         IU     = ItemUsage.GetComponent <ItemUsage> ();
        Initialise_Button IB     = NoLostFocus.GetComponent <Initialise_Button> ();

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

        InBattle           = false;
        Fight.enabled      = true;
        Fight.interactable = true;
        Act.enabled        = true;
        Act.interactable   = true;
        Mercy.enabled      = true;
        Mercy.interactable = true;
        Item.enabled       = true;
        Item.interactable  = true;
        if (lastselect2.ToString() == "Fight")
        {
            Fight.Select();
        }
        else if (lastselect2.ToString() == "Act")
        {
            Act.Select();
        }
        else if (lastselect2.ToString() == "Item")
        {
            Item.Select();
        }
        else if (lastselect2.ToString() == "Mercy")
        {
            Mercy.Select();
        }
        Heart.transform.position = FightPos.position;
        //AtkDamage.Stop ();
        Atk_0.enabled = false;
        //BattleBg.enabled = false;
        TextBoxAnim.Play("TextBox1Reverse");
        Hs.enabled            = false;
        IU.Item1_2Finished    = false;
        Main.Neutral         += 1;
        TalkB.TalkingProgress = false;
        Attack.CancelSpawn    = true;
        Attack.RemoveLaser();
        //yield return true;
    }
Esempio n. 3
0
    public void ItemExit()
    {
        GameObject item   = GameObject.Find("ItemMove");
        Item       Script = item.GetComponent <Item> ();

        gameObject.transform.position = Item1.transform.position;
        Item1.interactable            = true;
        Script.OnItemMenu             = false;
        Item1.enabled = true;
        Item1.Select();
        MainMenuTxt Main = GetComponent <MainMenuTxt> ();

        Main.MainMenTxt();
        Script.NOfClicks = 0;
        HeartPos         = 0;
    }
Esempio n. 4
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;
        }
    }
Esempio n. 5
0
    public void DancingChange()
    {
        GameObject act    = GameObject.Find("ActMove");
        Act        Script = act.GetComponent <Act> ();
        UITextTypeWriterSuspense SusType    = Script.Suspense.GetComponent <UITextTypeWriterSuspense> ();
        UITextTypeWriterDance2   Dance2Type = Script.Dance_Text_2.GetComponent <UITextTypeWriterDance2> ();
        //TalkBox
        TalkBox TalkBox = TextBox.GetComponent <TalkBox>();
        //TextBox
        MainMenuTxt MainMenTxt = gameObject.GetComponent <MainMenuTxt>();

        if (DanceFinished)
        {
            SusType.ChangeText("...", 0f);
            Script.Suspense.enabled = true;
            DanceFinished           = false;
        }
        if (SuspenseFinished)
        {
            SuspenseFinished             = false;
            Script.XDance_Text_2.enabled = true;
            Script.Dance_Text_2.enabled  = true;
            Dance2Type.ChangeText(DanceTxt2, 0f);
        }

        //Variations of the message indicating how closer you are to sparing(The talkbox msgs are one below of the corresponding one)
        if (DanceNmb == 0)
        {
            DanceTxt  = "You try to dance like him";
            DanceTxt2 = "You do it wrong.";
        }
        else if (DanceNmb == 1)
        {
            DanceTxt2 = "You do a little better.";
            TalkBox.TalkBoxTextString = "What was that?";
            MainMenTxt.Txt            = "He doesn't like your dancing";
        }
        else if (DanceNmb == 2)
        {
            DanceTxt2 = "You start to get the rythym.";
            TalkBox.TalkBoxTextString = "You think you can dance like me?";
            MainMenTxt.Txt            = "He doesn't like your dancing2";
        }
        else if (DanceNmb == 3)
        {
            DanceTxt2 = "You begin to understand the dance.";
            TalkBox.TalkBoxTextString = "Very catchy ah?";
        }
        else if (DanceNmb == 4)
        {
            DanceTxt2 = "You get one step right.";
            TalkBox.TalkBoxTextString = "Watch and learn kiddo.";
        }
        else if (DanceNmb == 5)
        {
            DanceTxt2 = "You do almost as well as he.";
            TalkBox.TalkBoxTextString = "I like that.";
        }
        else if (DanceNmb == 6)
        {
            DanceTxt2 = "You start glowing.";
            TalkBox.TalkBoxTextString = "Quiero decirte al oido, tantas cosas preciosas...(♫)";
        }
        else if (DanceNmb == 7)
        {
            DanceTxt2 = "You start morphing.";
            TalkBox.TalkBoxTextString = "Que estoy sintiendo por tiiii...(♫)";
        }
        else if (DanceNmb == 8)
        {
            DanceTxt2 = "You are 50%RealNoFake.";
            TalkBox.TalkBoxTextString = "Que te quiero que te adoro...(♫)";
        }
        else if (DanceNmb == 9)
        {
            DanceTxt2 = "You are 75%RealNoFake.";
            TalkBox.TalkBoxTextString = "Que eres la mujer que he soñado...(♫)";
        }
        else if (DanceNmb == 10)
        {
            DanceTxt2 = "You are 100%RealNoFake.";
            TalkBox.TalkBoxTextString = "Que me haces muy feliiiz...(♫)";
        }
        else if (DanceNmb == 11)
        {
            DanceTxt2 = "He spared you.";
            TalkBox.TalkBoxTextString = "♫♫♫♫♫♫";
            MainMenTxt.Txt            = "He Spared you.";
        }
        else if (DanceNmb == 12)
        {
            Spareable = true;
            Music.Stop();
        }
    }
Esempio n. 6
0
    public void FightMove()
    {
        Fight          FightScript = FightMoveScript.GetComponent <Fight> ();
        Mercy          MercyScript = MercyMoveScript.GetComponent <Mercy> ();
        FightBar       FightB      = FightBar.GetComponent <FightBar> ();
        SpriteRenderer spr         = FightBar.GetComponent <SpriteRenderer> ();
        HitSound       Hs          = Attack_0.GetComponent <HitSound> ();
        BattleFight    Bf          = AtkDamage.GetComponent <BattleFight> ();
        GameObject     item        = GameObject.Find("ItemMove");
        Item           IScript     = item.GetComponent <Item> ();
        GameObject     act         = GameObject.Find("ActMove");
        Act            Script      = act.GetComponent <Act> ();

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

        Animator AtkDamageAnim = AtkDamage.GetComponent <Animator> ();
        Animator BgAnim        = FightBg.GetComponent <Animator> ();

        if (Input.GetAxisRaw("Cancel") == 1)
        {
            if (FightScript.OnFightMenu)
            {
                gameObject.transform.position = Fight1.transform.position;
                Fight1.enabled      = true;
                Fight1.interactable = true;

                Fight1.Select();
                MainMenuTxt Main = GetComponent <MainMenuTxt> ();
                Main.MainMenTxt();
                FightScript.OnFightMenu        = false;
                Script.OnActMenuNmb            = 0;
                IScript.OnItemMenu             = false;
                xFight.enabled                 = false;
                FightName.enabled              = false;
                HealthBar_Enemy.enabled        = false;
                HealthBarDamaged_Enemy.enabled = false;
            }
        }

        if (Input.GetAxisRaw("Submit") == 1)
        {
            if (IScript.NOfClicks > 1)
            {
                if (FightScript.OnFightMenu)
                {
                    Attack.CancelSpawn             = false;
                    xFight.enabled                 = false;
                    FightName.enabled              = false;
                    HealthBar_Enemy.enabled        = false;
                    HealthBarDamaged_Enemy.enabled = false;
                    PressFx.Play();
                    gameObject.SetActive(false);
                    Fight1.enabled          = true;
                    Fight1.enabled          = false;
                    spr.enabled             = true;
                    Attacking               = true;
                    IScript.NOfClicks       = 1;
                    FightB.IsMoving         = true;
                    FightScript.OnFightMenu = false;
                    Hs.enabled              = false;
                    Bf.enabled              = false;
                    BgAnim.enabled          = true;
                    FightBg.enabled         = true;
                }
            }
        }
    }
Esempio n. 7
0
    // Update is called once per frame
    void OnEnable()
    {
        MainMenuTxt Main = Heart.GetComponent <MainMenuTxt> ();

        Main.MainMenTxt();
    }