public void SetShoesEquip(S_Wardrobe shoes) { shoesEquipped = shoes; //set other shoes inactive if (otherShoes != null) { foreach (object obj in otherShoes.transform) { Transform child = (Transform)obj; child.gameObject.SetActive(false); } } //set selected shoes active switch (shoesEquipped) { case S_Wardrobe.SHOES_DEFAULT: Shoes = transform.Find("Shoes/Default").gameObject; break; case S_Wardrobe.SHOES_PLATE: Shoes = transform.Find("Shoes/Armour1").gameObject; break; } if (shoesEquipped != S_Wardrobe.SHOES_NULL) { Shoes.SetActive(true); ShoesAnim = Shoes.GetComponent <Animator>(); ShoesAnim.SetBool(attackStyle.ToString(), attackPlaceHolder); } }
public void SelectGame_1() { selectgame1.SetActive(true); SelectyypeMale.SetActive(false); SelectyypeFemale.SetActive(false); Gameinterface.SetActive(false); Menu.SetActive(false); male.SetActive(false); female.SetActive(false); maleregis.SetActive(false); maleems.SetActive(false); femaleregis.SetActive(false); femaleems.SetActive(false); costumeMale.SetActive(false); costumeMaleEMS.SetActive(false); costumeFemale.SetActive(false); costumeFemaleEMS.SetActive(false); TShirtM.SetActive(false); CoatM.SetActive(false); HelmetM.SetActive(false); PlantM.SetActive(false); ShoesM.SetActive(false); IDCardM.SetActive(false); TShirtEMS.SetActive(false); CoatEMS.SetActive(false); HelmetEMS.SetActive(false); PlantEMS.SetActive(false); ShoesEMS.SetActive(false); IDCardEMS.SetActive(false); TShirt.SetActive(false); Coat.SetActive(false); Helmet.SetActive(false); Plant.SetActive(false); Shoes.SetActive(false); IDCard.SetActive(false); TShirtFEMS.SetActive(false); CoatFEMS.SetActive(false); HelmetFEMS.SetActive(false); PlantFEMS.SetActive(false); ShoesFEMS.SetActive(false); IDCardFEMS.SetActive(false); randomitem(); randomitemect(); }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "TShirt") { GameLogic.score += 10; TShirt.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Coat") { GameLogic.score += 10; Coat.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Helmet") { GameLogic.score += 10; Helmet.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Plant") { GameLogic.score += 10; Plant.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Shoes") { GameLogic.score += 10; Shoes.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "IDCard") { GameLogic.score += 10; IDCard.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Bag") { GameLogic.score += 10; other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "Paper") { GameLogic.score += 10; other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "signaturetool") { GameLogic.score += 10; Coat.SetActive(true); other.transform.parent.gameObject.SetActive(false); Debug.Log("hitTrue"); } if (other.gameObject.tag == "GAME1FALSE") { GameLogic.time -= 5; other.transform.parent.gameObject.SetActive(false); Debug.Log("HitFalse"); } }