Esempio n. 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();
    }
 /// <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();
         }
     }
 }
Esempio n. 3
0
    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);
        }
    }
Esempio n. 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();
        }
    }
Esempio n. 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();
        }
    }
Esempio n. 6
0
    public void Show(string material)
    {
        AssignMaterial(material);

        TweenToggle toggle = GetComponent <TweenToggle>();

        toggle.ShowFunctionName = "DecreaseCameraClip";         // Assigning callback
        toggle.Show();
    }
Esempio n. 7
0
    private IEnumerator ShowContentHelper()
    {
        yield return(new WaitForSeconds(1.0f));

        if (contentTweenParent != null)
        {
            contentTweenParent.Show();
            StartCoroutine(HidePet());
        }
    }
Esempio n. 8
0
 public void PetSpeechZoomToggle(bool isZoomed)
 {
     if (isZoomed)
     {
         speechCanvasTween.Show();
     }
     else
     {
         speechCanvasTween.Hide();
     }
 }
Esempio n. 9
0
 public void TogglePauseButton(bool isShow)
 {
     if (isShow)
     {
         pauseButtonTween.Show();
     }
     else
     {
         pauseButtonTween.Hide();
     }
 }
Esempio n. 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();
    }
Esempio n. 11
0
 // Show the button and/or with grid
 public void ShowPanel(bool isShowGrid = false)
 {
     inventoryTween.Show();
     if (isShowGrid)
     {
         ToggleGrid(true);
     }
     else
     {
         ToggleGrid(false);
     }
 }
Esempio n. 12
0
 // Toggling the grid
 private void ToggleGrid(bool isShowing)
 {
     if (isShowing)
     {
         toggleButton.isOn = true;
         inventoryGridTween.Show();
     }
     else
     {
         toggleButton.isOn = false;
         inventoryGridTween.Hide();
     }
 }
Esempio n. 13
0
    // 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
        }
    }
Esempio n. 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);
    }
Esempio n. 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();
    }
Esempio n. 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();
    }
Esempio n. 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();
        }
    }
Esempio n. 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;
     }
 }
Esempio n. 19
0
 /// <summary>
 /// Shows the second choose UI, called from first finish callback
 /// </summary>
 public void ShowNameEntryUI()
 {
     nameTweenParent.Show();
 }
Esempio n. 20
0
 protected override void _OpenUI()
 {
     alphaTween.Show();
 }
Esempio n. 21
0
    private IEnumerator CheckboxSpriteShowHelper(TweenToggle slash)
    {
        yield return(0);

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

        checkTween.Show();
    }
Esempio n. 25
0
 public void ShowPanel()
 {
     decoInventoryTween.Show();
 }
Esempio n. 26
0
    private IEnumerator CheckboxSpriteShowHelper()
    {
        yield return(0);

        slash.Show();
    }