void EnableMenu(GameObject[] Golist) { foreach (GameObject GO in Golist) { GO.SetActive(true); } }
public void EnableCollectables() { foreach (GameObject GO in collectibles) { GO.SetActive(true); } }
void DisableMenu(GameObject[] Golist) { foreach (GameObject GO in Golist) { GO.SetActive(false); } }
/// <summary> /// Hides anything in the showWhenInteractionIsPossible array /// </summary> protected virtual void HideInteractionInstruction() { foreach (GameObject GO in showWhenInteractionIsPossible) { GO.SetActive(false); } }
void PentacleEnded() { foreach (GameObject GO in objectsToActivate) { GO.SetActive(true); } if (pentacleFail) { dialogues.shouldWrite = true; dialogues.sequence = 4; pentacle.material = completePentacle; } else { dialogues.shouldWrite = true; dialogues.sequence = 3; pentacle.material = completePentacle; } dessinage.dessinage = false; if (pentacleFail) { Destroy(gameObject); GoodDessin = false; } else { GoodDessin = true; } particles.Play(); pentacleDone = false; }
private void DesactivarGameObjects() { foreach (var GO in listaGameObjects) { GO.SetActive(false); } }
public void Unhide() { foreach (GameObject GO in BodyPartsToHide) { GO.SetActive(true); } }
public void UIDisable() { foreach (GameObject GO in UI) { GO.SetActive(false); } }
void UpdateImageAnchor(ARImageAnchor arImageAnchor) { //Debug.LogFormat("image anchor updated[{0}] : tracked => {1}", arImageAnchor.identifier, arImageAnchor.isTracked); if (bindObjectToImage && MuseumLocationService.imageAnchors.TryGetValue(arImageAnchor.referenceImageName, out GameObject GO)) { GO = MuseumLocationService.imageAnchors[arImageAnchor.referenceImageName]; if (arImageAnchor.isTracked) { if (!GO.activeSelf) { GO.SetActive(true); } if (bindObjectToImage) { GO.transform.position = UnityARMatrixOps.GetPosition(arImageAnchor.transform); GO.transform.rotation = UnityARMatrixOps.GetRotation(arImageAnchor.transform); } } else if (GO) { GO.SetActive(false); } } }
private void SpawnVFX(Vector3 hitInfoPoint) { if (clickVFX == null) { return; } GameObject GO; if (_clickVFXPool.Count > 0) { int lastElement = _clickVFXPool.Count - 1; GO = _clickVFXPool[lastElement]; _clickVFXPool.RemoveAt(lastElement); GO.SetActive(true); GO.transform.position = hitInfoPoint; } else { GO = Instantiate(clickVFX, hitInfoPoint, Quaternion.identity, gameObject.transform); } StartCoroutine(DisableAfter(GO, clickVFXDuration)); }
private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.layer == LayerMask.NameToLayer("Obstacle")) { if (other.CompareTag("Planet")) { SoundManager.PlaySound(SoundManager.Sound.Explosion); } GetComponent <PlayerController>().enabled = false; foreach (GameObject GO in disableOnDeath) { GO.SetActive(false); } GameObject deathEffectGO = Instantiate(deathExplosion, this.transform); if (SystemInfo.deviceType == DeviceType.Handheld) { Handheld.Vibrate(); } OnDied?.Invoke(); } ; }
void restartLevel() { foreach (GameObject GO in Resources.FindObjectsOfTypeAll(typeof(GameObject))) { if (GO.tag == "floor") { GO.SetActive(GO.GetComponent <floorTileScript>().activeAtStart); } } foreach (GameObject button in GameObject.FindGameObjectsWithTag("button")) { foreach (GameObject feature in button.GetComponent <buttonScript>().connectedFeatures) { if (feature.gameObject.tag == "floor") { feature.SetActive(feature.GetComponent <floorTileScript> ().activeAtStart); } else { feature.SetActive(feature.GetComponent <pressurePlate> ().activeAtStart); } } } transform.position = spawnPoint.transform.position; }
public void OnMouseDown() { if (!isShow) { anim.SetBool("IsAppear", true); isShow = true; foreach (GameObject GO in UI) { GO.SetActive(true); } } else { anim.SetBool("IsAppear", false); isShow = false; Invoke("UIDisable", 1.0f); /*foreach (GameObject GO in UI) * { * GO.SetActive(false); * }*/ } }
private void EnableGameElements(bool state) { foreach (GameObject GO in disabledInMenus) { GO.SetActive(state); } }
void Start() { GOs = GameObject.FindGameObjectsWithTag("CP"); //number_of_players = 0; switch (gameObject.name) { case "NoPSlider": slider.value = GameSetting.NumberOfPlayers; NoPText.text = slider.value.ToString(); foreach (GameObject GO in GOs) { GO.SetActive((int)GO.name[2] - 48 <= GameSetting.NumberOfPlayers ? true : false); } break; case "GLSlider": slider.value = GameSetting.GameLength / 10; GLText.text = GameSetting.GameLength.ToString(); break; case "DRSlider": slider.value = GameSetting.DropRate / 5; DRText.text = GameSetting.DropRate.ToString() + "‰"; break; case "RoundSlider": slider.value = (GameSetting.NumberOfRounds - 1) / 2; DRText.text = GameSetting.NumberOfRounds.ToString(); break; default: Debug.Log("Something bad will happen"); break; } }
//highQuality = true and lowQuality = false public void setQuality(bool setHighQuality) { if (!setHighQuality) { data.highQuality = false; } else { data.highQuality = true; } for (int i = 0; i < highQualityItems.Count; i++) { if (highQualityItems [i] == null) { highQualityItems.RemoveAt(i); Debug.Log("Removed at index " + i + ". Length: " + highQualityItems.Count); i--; } } foreach (GameObject GO in highQualityItems) { GO.SetActive(data.highQuality); } }
public void UpdateUIRoleInfo() { foreach (GameObject GO in roomUIRoleInfo) { GO.SetActive(false); } roomUIRoleInfo[InRoom_Menu.SP.localPlayer.roleType + (InRoom_Menu.SP.localPlayer.team - 1) * 3].SetActive(true); }
/// <summary> /// Disables resource. This is only meaningful for mutable resources. /// This method must be idempotent. /// </summary> public virtual void Disable() { if (GO == null) { return; } GO.SetActive(false); }
/// <summary> /// Enables resource. This is only meaningful for mutable resources. /// This method must be idempotent. /// </summary> public virtual void Enable() { if (GO == null) { return; } GO.SetActive(true); }
private void CheckId(int IdAgent) { foreach (GameObject GO in ListText) { GO.SetActive(false); } ListText[IdAgent].SetActive(true); }
public void EnableProgressBar() { _filledProgressBarImage.gameObject.SetActive(true); foreach (var GO in _GOs) { GO.SetActive(true); } }
public override void SetActive(bool b) { if (GO.activeSelf == b) { return; } GO.SetActive(b); }
public void ToDefault() { foreach (GameObject GO in letters) { GO.SetActive(false); } full.SetActive(false); }
void BackToMenu(GameObject button) { foreach (GameObject GO in lobbyUIRightPage) { GO.SetActive(false); } show = false; Name_Menu.SP.RequirePlayerName = true; }
public virtual void SetActive(bool b = true) { IsShow = b; if (GO.activeSelf == b) { return; } GO.SetActive(b); }
private void levelFinished() { TfruitCollected.text = "" + score; TmaxFruit.text = "" + maxScore; foreach (GameObject GO in GOendscreen) { GO.SetActive(true); } }
// Use this for initialization void Start() { isShow = false; anim = GetComponent <Animator>(); foreach (GameObject GO in UI) { GO.SetActive(false); } }
public void DisableProgressBar() { Reset(); _filledProgressBarImage.gameObject.SetActive(false); foreach (var GO in _GOs) { GO.SetActive(false); } }
// Start is called before the first frame update void Start() { foreach (GameObject GO in objectsToEnable) { GO.SetActive(true); } foreach (GameObject GO in objectsToDisable) { GO.SetActive(false); } }
/// <summary> /// Show anything in the showWhenInteractionIsPossible array /// </summary> protected virtual void ShowInteractionInstruction() { if (happenOnlyOnce && alreadyHappened) { return; } foreach (GameObject GO in showWhenInteractionIsPossible) { GO.SetActive(true); } }