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"); } } } } }
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; }
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; } }
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; } } } }
// Update is called once per frame void OnEnable() { MainMenuTxt Main = Heart.GetComponent <MainMenuTxt> (); Main.MainMenTxt(); }