コード例 #1
0
    protected override void _OpenUI()
    {
        nameLabel.text = SelectedMiniPetName;
        this.GetComponent <TweenToggleDemux>().Show();
        storeTweenParent.Show();

        //Hide other UI objects
        NavigationUIManager.Instance.HidePanel();
        HUDUIManager.Instance.HidePanel();
        InventoryUIManager.Instance.ShowPanel();
        RoomArrowsUIManager.Instance.HidePanel();
    }
コード例 #2
0
 /// <summary>
 /// Event callback when yes radio button is clicked
 /// </summary>
 public void OnAsthmaYes(bool isChecked)
 {
     if (isChecked)
     {
         AudioManager.Instance.PlayClip("buttonGeneric3");
         hasAsthma = true;
         if (!hasAsthmaOptionChecked)
         {
             hasAsthmaOptionChecked = true;
             submitButtonTween.Show();
         }
     }
 }
コード例 #3
0
ファイル: MicroMixManager.cs プロジェクト: aliken9/MyZooPets
    private IEnumerator InTransitionHelper(float tweenTime)
    {
        transitionMonsterTweenToggle.Show();
        transitionPetTweenToggle.Show();

        isParticlePaused = true;
        monsterParticle.Play();

        bool       hasBackground     = currentMicro != null && currentMicro.Background != -1; //Tween old background
        GameObject currentBackground = null;

        if (hasBackground)
        {
            currentBackground = backgrounds[currentMicro.Background];
            foreach (SpriteRenderer spriteRenderer in currentBackground.GetComponentsInChildren <SpriteRenderer>())
            {
                LeanTween.alpha(spriteRenderer.gameObject, 0, 1f).setEase(LeanTweenType.easeInOutQuad);
            }
        }

        monsterBackground.GetComponent <SpriteRenderer>().color = new Color(.239f, .333f, .454f, 0);        //Tween monster background
        LeanTween.alpha(monsterBackground, 1, tweenTime).setEase(LeanTweenType.easeInOutQuad);

        yield return(WaitSecondsPause(tweenTime));        //Yield

        if (hasBackground)
        {
            foreach (SpriteRenderer spriteRenderer in currentBackground.GetComponentsInChildren <SpriteRenderer>())
            {
                spriteRenderer.color = Color.white;                //Reset old background
            }
            currentBackground.SetActive(false);
        }
    }
コード例 #4
0
    /// <summary>
    /// Called by the slider when the value has changed. Rounds up to the nearest integer for age
    /// </summary>
    public void OnSliderChange()
    {
        age = (int)slider.value;

        if (age == (int)slider.maxValue)
        {
            ageText.text = age.ToString() + "+";
        }
        else
        {
            if (lastAgeAux != age)
            {
                float pitchCount = 1f + (age * 0.1f);

                Hashtable hashOverride = new Hashtable();
                hashOverride["Pitch"] = pitchCount;
                AudioManager.Instance.PlayClip("buttonGeneric3", option: hashOverride);
                lastAgeAux = age;
            }

            ageText.text = age.ToString();
        }

        if (!hasMovedSlider)
        {
            hasMovedSlider = true;
            submitButtonTween.Show();
        }
    }
コード例 #5
0
    //When the highscore board is clicked and zoomed into
    protected override void _OpenUI()
    {
        if (!isActive)
        {
            AudioManager.Instance.PlayClip("subMenu");

            // if there is a camera move, do it -- otherwise, just skip to the move being complete
            if (zoomTime > 0)
            {
                CameraManager.Callback cameraDoneFunction = delegate(){
                    CameraMoveDone();
                };
                CameraManager.Instance.ZoomToTarget(finalPosition, finalRotation, zoomTime, cameraDoneFunction);
            }
            else
            {
                CameraMoveDone();
            }

            //Hide other UI objects
            NavigationUIManager.Instance.HidePanel();
            HUDUIManager.Instance.HidePanel();
            InventoryUIManager.Instance.HidePanel();
            RoomArrowsUIManager.Instance.HidePanel();

            isActive = true;
            highscoreBoard.GetComponent <Collider>().enabled = false;

            backButtonTween.Show();
        }
    }
コード例 #6
0
    public void Show(string material)
    {
        AssignMaterial(material);

        TweenToggle toggle = GetComponent <TweenToggle>();

        toggle.ShowFunctionName = "DecreaseCameraClip";         // Assigning callback
        toggle.Show();
    }
コード例 #7
0
    private IEnumerator ShowContentHelper()
    {
        yield return(new WaitForSeconds(1.0f));

        if (contentTweenParent != null)
        {
            contentTweenParent.Show();
            StartCoroutine(HidePet());
        }
    }
コード例 #8
0
 public void PetSpeechZoomToggle(bool isZoomed)
 {
     if (isZoomed)
     {
         speechCanvasTween.Show();
     }
     else
     {
         speechCanvasTween.Hide();
     }
 }
コード例 #9
0
 public void TogglePauseButton(bool isShow)
 {
     if (isShow)
     {
         pauseButtonTween.Show();
     }
     else
     {
         pauseButtonTween.Hide();
     }
 }
コード例 #10
0
    public void ShowColorChooseUI()
    {
        logoTitleTween.Hide();

        EggController.Instance.ToggleEggIdleAnimation(false);
        EggController.Instance.ToggleEggCollider(false);
        EggController.Instance.EggCrack(1);
        leafParticle.Stop();

        // Show egg color choosing UI
        colorTweenParent.Show();
    }
コード例 #11
0
 // Show the button and/or with grid
 public void ShowPanel(bool isShowGrid = false)
 {
     inventoryTween.Show();
     if (isShowGrid)
     {
         ToggleGrid(true);
     }
     else
     {
         ToggleGrid(false);
     }
 }
コード例 #12
0
 // Toggling the grid
 private void ToggleGrid(bool isShowing)
 {
     if (isShowing)
     {
         toggleButton.isOn = true;
         inventoryGridTween.Show();
     }
     else
     {
         toggleButton.isOn = false;
         inventoryGridTween.Hide();
     }
 }
コード例 #13
0
ファイル: DecorationZone.cs プロジェクト: aliken9/MyZooPets
    // Event listener. listening to when decoration mode is enabled/disabled
    private void ShowDecoZones(object sender, UIManagerEventArgs args)
    {
        TweenToggle toggle = GetComponent <ScaleTweenToggle>();

        if (args.Opening)
        {
            toggle.Show();                  // edit mode is opening, so turn this node on
        }
        else
        {
            toggle.Hide();                  // edit mode is closing so turn this node off
        }
    }
コード例 #14
0
    public void ShowCategory(AccessoryTypes type)
    {
        baseTween.Hide();
        gridTween.Show();
        int itemCount = 0;

        // Reset accessory list
        accessoryEntryList = new List <AccessoryStoreItemController>();

        // Populate the entries with loaded data
        List <Item> accessoryList = ItemManager.Instance.AccessoryList;

        foreach (AccessoryItem accessoryData in accessoryList)
        {
            if (accessoryData.AccessoryType == type)
            {
                // Change the title of the category
                switch (accessoryData.AccessoryType)
                {
                case AccessoryTypes.Hat:
                    categoryBanner.key = "ACCESSORIES_TYPE_HAT";
                    break;

                case AccessoryTypes.Glasses:
                    categoryBanner.key = "ACCESSORIES_TYPE_GLASSES";
                    break;

                default:
                    Debug.LogError("Invalid accessory type");
                    break;
                }
                categoryBanner.Localize();                    // Force relocalize

                GameObject accessoryEntry = GameObjectUtils.AddChild(gridParent.gameObject, accessoryEntryPrefab);
                AccessoryStoreItemController entryController = accessoryEntry.GetComponent <AccessoryStoreItemController>();
                entryController.Init(accessoryData);
                accessoryEntryList.Add(entryController);
                itemCount++;
            }
        }

        // Adjust the grid height based on the height of the cell and spacing
        float gridHeight = itemCount * (gridParent.cellSize.y + gridParent.spacing.y);

        gridParent.GetComponent <RectTransform>().sizeDelta = new Vector2(gridParent.cellSize.x, gridHeight);
    }
コード例 #15
0
    public void OnGridBackButton()
    {
        // Delete all the elements in current grid
        foreach (Transform child in gridParent.transform)
        {
            Destroy(child.gameObject);
        }

        // Reset the scroll bar
        scrollRect.StopMovement();
        Vector2 auxPosition = gridParent.GetComponent <RectTransform>().anchoredPosition;

        gridParent.GetComponent <RectTransform>().anchoredPosition = new Vector2(auxPosition.x, 0f);

        gridTween.Hide();
        baseTween.Show();
    }
コード例 #16
0
    protected override void _OpenUI()
    {
        backButtonParent.SetActive(!isHideBackButton);

        //Hide other UI objects
        NavigationUIManager.Instance.HidePanel();
        InventoryUIManager.Instance.HidePanel();
        RoomArrowsUIManager.Instance.HidePanel();

        // Open the fire crystal UI manager together with special settings
        FireCrystalUIManager.Instance.isLockModeInClickmanager = false;         // Temporary unlock
        FireCrystalUIManager.Instance.isIgnoreTweenLockOnClose = true;
        FireCrystalUIManager.Instance.OpenUI();

        // show the UI itself
        wellapadTweenParent.Show();
        RefreshScreen();
    }
コード例 #17
0
    IEnumerator SetNextFrameShow()
    {
        yield return(0);

        foreach (GameObject go in GoList)
        {
            TweenToggle toggle = go.GetComponent <TweenToggle>();
            if (toggle != null)
            {
                toggle.Show();
            }
        }

        // If set to begin show callback, call it now!
        if (!isShowFinishedCallback)
        {
            ShowSendCallback();
        }
    }
コード例 #18
0
 protected override void ProcessClick()
 {
     if (Debug.isDebugBuild)
     {
         Debug.LogWarning("DEBUG ENTRANCE, CLEAN UP HERE");
         Pass();
         return;
     }
     if (!isCanvasShowing)
     {
         canvasToggle.Show();
         isCanvasShowing = true;
         if (DataManager.Instance.GameData.MicroMix.EntranceHasCrystal)
         {
             Pass();
         }
     }
     else
     {
         canvasToggle.Hide();
         isCanvasShowing = false;
     }
 }
コード例 #19
0
 /// <summary>
 /// Shows the second choose UI, called from first finish callback
 /// </summary>
 public void ShowNameEntryUI()
 {
     nameTweenParent.Show();
 }
コード例 #20
0
 protected override void _OpenUI()
 {
     alphaTween.Show();
 }
コード例 #21
0
    private IEnumerator CheckboxSpriteShowHelper(TweenToggle slash)
    {
        yield return(0);

        slash.Show();
    }
コード例 #22
0
 private void ShowBothArrows(bool isGatingRoom)
 {
     rightArrowSprite.sprite = isGatingRoom ? rightArrowInactiveRef : rightArrowActiveRef;
     rightArrowTween.Show();
     leftArrowTween.Show();
 }
コード例 #23
0
 public void ShowButtons(object sender, System.EventArgs args)
 {
     restartButtonToggle.Show();
     quitButtonToggle.Show();
     InventoryUIManager.Instance.HidePanel();
 }
コード例 #24
0
    private IEnumerator CheckboxSpriteShowHelper()
    {
        yield return(0);

        checkTween.Show();
    }
コード例 #25
0
 public void ShowPanel()
 {
     decoInventoryTween.Show();
 }
コード例 #26
0
    private IEnumerator CheckboxSpriteShowHelper()
    {
        yield return(0);

        slash.Show();
    }