コード例 #1
0
 void EnableMenu(GameObject[] Golist)
 {
     foreach (GameObject GO in Golist)
     {
         GO.SetActive(true);
     }
 }
コード例 #2
0
 public void EnableCollectables()
 {
     foreach (GameObject GO in collectibles)
     {
         GO.SetActive(true);
     }
 }
コード例 #3
0
 void DisableMenu(GameObject[] Golist)
 {
     foreach (GameObject GO in Golist)
     {
         GO.SetActive(false);
     }
 }
コード例 #4
0
 /// <summary>
 /// Hides anything in the showWhenInteractionIsPossible array
 /// </summary>
 protected virtual void HideInteractionInstruction()
 {
     foreach (GameObject GO in showWhenInteractionIsPossible)
     {
         GO.SetActive(false);
     }
 }
コード例 #5
0
    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;
    }
コード例 #6
0
 private void DesactivarGameObjects()
 {
     foreach (var GO in listaGameObjects)
     {
         GO.SetActive(false);
     }
 }
コード例 #7
0
 public void Unhide()
 {
     foreach (GameObject GO in BodyPartsToHide)
     {
         GO.SetActive(true);
     }
 }
コード例 #8
0
ファイル: MenuUI.cs プロジェクト: MayukoElaine/inugo
 public void UIDisable()
 {
     foreach (GameObject GO in UI)
     {
         GO.SetActive(false);
     }
 }
コード例 #9
0
    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);
            }
        }
    }
コード例 #10
0
    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));
    }
コード例 #11
0
ファイル: Death.cs プロジェクト: Alzahel/FlyHigh
    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();
        }
        ;
    }
コード例 #12
0
 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;
 }
コード例 #13
0
ファイル: MenuUI.cs プロジェクト: MayukoElaine/inugo
    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);
             * }*/
        }
    }
コード例 #14
0
ファイル: GameManager.cs プロジェクト: Alzahel/FlyHigh
 private void EnableGameElements(bool state)
 {
     foreach (GameObject GO in disabledInMenus)
     {
         GO.SetActive(state);
     }
 }
コード例 #15
0
    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;
        }
    }
コード例 #16
0
    //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);
        }
    }
コード例 #17
0
ファイル: Room_MenuUIManager.cs プロジェクト: PenpenLi/AOL
 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);
 }
コード例 #18
0
 /// <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);
 }
コード例 #19
0
 /// <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);
 }
コード例 #20
0
ファイル: PlayerSelection.cs プロジェクト: AnthoC97/Pac_Man
 private void CheckId(int IdAgent)
 {
     foreach (GameObject GO in ListText)
     {
         GO.SetActive(false);
     }
     ListText[IdAgent].SetActive(true);
 }
コード例 #21
0
ファイル: ProgressBar.cs プロジェクト: KRILLEKS/PickaxesHero
 public void EnableProgressBar()
 {
     _filledProgressBarImage.gameObject.SetActive(true);
     foreach (var GO in _GOs)
     {
         GO.SetActive(true);
     }
 }
コード例 #22
0
 public override void SetActive(bool b)
 {
     if (GO.activeSelf == b)
     {
         return;
     }
     GO.SetActive(b);
 }
コード例 #23
0
ファイル: WordRideCanvas.cs プロジェクト: bigstupidx/DriverX
 public void ToDefault()
 {
     foreach (GameObject GO in letters)
     {
         GO.SetActive(false);
     }
     full.SetActive(false);
 }
コード例 #24
0
ファイル: Lobby_Menu.cs プロジェクト: PenpenLi/AOL
 void BackToMenu(GameObject button)
 {
     foreach (GameObject GO in lobbyUIRightPage)
     {
         GO.SetActive(false);
     }
     show = false;
     Name_Menu.SP.RequirePlayerName = true;
 }
コード例 #25
0
ファイル: UControl.cs プロジェクト: chengyimingvb/CYMUni
 public virtual void SetActive(bool b = true)
 {
     IsShow = b;
     if (GO.activeSelf == b)
     {
         return;
     }
     GO.SetActive(b);
 }
コード例 #26
0
 private void levelFinished()
 {
     TfruitCollected.text = "" + score;
     TmaxFruit.text       = "" + maxScore;
     foreach (GameObject GO in GOendscreen)
     {
         GO.SetActive(true);
     }
 }
コード例 #27
0
ファイル: MenuUI.cs プロジェクト: MayukoElaine/inugo
    // Use this for initialization
    void Start()
    {
        isShow = false;
        anim   = GetComponent <Animator>();

        foreach (GameObject GO in UI)
        {
            GO.SetActive(false);
        }
    }
コード例 #28
0
ファイル: ProgressBar.cs プロジェクト: KRILLEKS/PickaxesHero
    public void DisableProgressBar()
    {
        Reset();

        _filledProgressBarImage.gameObject.SetActive(false);
        foreach (var GO in _GOs)
        {
            GO.SetActive(false);
        }
    }
コード例 #29
0
 // 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);
     }
 }
コード例 #30
0
 /// <summary>
 /// Show anything in the showWhenInteractionIsPossible array
 /// </summary>
 protected virtual void ShowInteractionInstruction()
 {
     if (happenOnlyOnce && alreadyHappened)
     {
         return;
     }
     foreach (GameObject GO in showWhenInteractionIsPossible)
     {
         GO.SetActive(true);
     }
 }