Beispiel #1
0
    private void ClearActionButtons()
    {
        SpritedStringUI buttonText     = null;
        ButtonAnimator  buttonAnimator = null;
        GameObject      buttonObject   = null;

        if (actionTexts != null)
        {
            for (int i = 0; i < actionTexts.Length; i++)
            {
                buttonText = actionTexts[i];
                if (buttonText != null)
                {
                    buttonText.Clear();
                    actionTexts[i] = null;
                }
            }
            actionTexts = null;
        }
        if (actionTextObjects != null)
        {
            for (int i = 0; i < actionTextObjects.Length; i++)
            {
                buttonObject = actionTextObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    actionTextObjects[i] = null;
                }
            }
            actionTextObjects = null;
        }
        if (actionButtons != null)
        {
            for (int i = 0; i < actionButtons.Length; i++)
            {
                buttonAnimator = actionButtons[i];
                if (buttonAnimator != null)
                {
                    buttonAnimator.Clear();
                    actionButtons[i] = null;
                }
            }
            actionButtons = null;
        }
        actionButtonTransforms = null;
        if (actionButtonObjects != null)
        {
            for (int i = 0; i < actionButtonObjects.Length; i++)
            {
                buttonObject = actionButtonObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    actionButtonObjects[i] = null;
                }
            }
            actionButtonObjects = null;
        }
    }
Beispiel #2
0
    private void ClearHypotheticalStatsDisplay()
    {
        SpritedStringUI hypotheticText = null;

        if (hypotheticTexts != null)
        {
            for (int i = 0; i < hypotheticTexts.Length; i++)
            {
                hypotheticText = hypotheticTexts[i];
                if (hypotheticText != null)
                {
                    hypotheticText.Clear();
                    hypotheticTexts[i] = null;
                }
            }
        }
        GameObject hypotheticObject = null;

        if (hypotheticObjects != null)
        {
            for (int i = 0; i < hypotheticObjects.Length; i++)
            {
                hypotheticObject = hypotheticObjects[i];
                if (hypotheticObject != null)
                {
                    Destroy(hypotheticObject);
                    hypotheticObjects[i] = null;
                }
            }
        }
    }
Beispiel #3
0
 protected override void ClearStatsDisplay()
 {
     if (currencyText != null)
     {
         currencyText.Clear();
         currencyText = null;
     }
     currencyTextTrans = null;
     if (currencyTextObject != null)
     {
         Destroy(currencyTextObject);
         currencyTextObject = null;
     }
     currencyImage      = null;
     currencyImageTrans = null;
     if (currencyImageObject != null)
     {
         Destroy(currencyImageObject);
         currencyImageObject = null;
     }
     base.ClearStatsDisplay();
 }
Beispiel #4
0
    protected virtual void ClearStatsDisplay()
    {
        SpritedStringUI textComponent = null;

        SpritedStringUI[] textComponents = null;
        RectTransform[]   textTransforms = null;
        GameObject        textObject     = null;

        GameObject[] textObjects = null;

        if (levelObject != null)
        {
            levelText.Clear();
            levelText = null;
            Destroy(levelObject);
            levelObject = null;
        }
        if (stats != null)
        {
            for (int i = 0; i < stats.Length; i++)
            {
                statValues[i]  = null;
                textComponents = statTexts[i];
                if (textComponents != null)
                {
                    for (int j = 0; j < textComponents.Length; j++)
                    {
                        textComponent = textComponents[j];
                        if (textComponent != null)
                        {
                            textComponent.Clear();
                            textComponents[j] = null;
                        }
                    }
                    statTexts[i] = null;
                }
                textTransforms = statTransforms[i];
                if (textTransforms != null)
                {
                    for (int j = 0; j < textTransforms.Length; j++)
                    {
                        textTransforms[j] = null;
                    }
                    statTransforms[i] = null;
                }
                textObjects = statObjects[i];
                if (textObjects != null)
                {
                    for (int j = 0; j < textObjects.Length; j++)
                    {
                        textObject = textObjects[j];
                        if (textObject != null)
                        {
                            Destroy(textObject);
                            textObjects[j] = null;
                        }
                    }
                    statObjects[i] = null;
                }
            }
            statValues     = null;
            statTexts      = null;
            statTransforms = null;
            statObjects    = null;
            stats          = null;
        }
    }
Beispiel #5
0
    private void ClearItemButtons()
    {
        SpritedStringUI buttonText     = null;
        ButtonAnimator  buttonAnimator = null;
        GameObject      buttonObject   = null;

        if (itemReturnButton != null)
        {
            itemReturnButton.Clear();
            itemReturnButton = null;
        }
        itemReturnButtonTransform = null;
        if (itemReturnButtonObject != null)
        {
            Destroy(itemReturnButtonObject);
            itemReturnButtonObject = null;
        }
        if (itemAdvanceButton != null)
        {
            itemAdvanceButton.Clear();
            itemAdvanceButton = null;
        }
        itemAdvanceButtonTransform = null;
        if (itemAdvanceButtonObject != null)
        {
            Destroy(itemAdvanceButtonObject);
            itemAdvanceButtonObject = null;
        }
        if (itemAmountComponents != null)
        {
            for (int i = 0; i < itemAmountComponents.Length; i++)
            {
                buttonText = itemAmountComponents[i];
                if (buttonText != null)
                {
                    buttonText.Clear();
                    itemAmountComponents[i] = null;
                }
            }
            itemAmountComponents = null;
        }
        itemAmountTransforms = null;
        if (itemAmountObjects != null)
        {
            for (int i = 0; i < itemAmountObjects.Length; i++)
            {
                buttonObject = itemAmountObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    itemAmountObjects[i] = null;
                }
            }
            itemAmountObjects = null;
        }
        if (itemTexts != null)
        {
            for (int i = 0; i < itemTexts.Length; i++)
            {
                buttonText = itemTexts[i];
                if (buttonText != null)
                {
                    buttonText.Clear();
                    itemTexts[i] = null;
                }
            }
            itemTexts = null;
        }
        itemTextTransforms = null;
        if (itemTextObjects != null)
        {
            for (int i = 0; i < itemTextObjects.Length; i++)
            {
                buttonObject = itemTextObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    itemTextObjects[i] = null;
                }
            }
            itemTextObjects = null;
        }
        if (itemButtons != null)
        {
            for (int i = 0; i < itemButtons.Length; i++)
            {
                buttonAnimator = itemButtons[i];
                if (buttonAnimator != null)
                {
                    buttonAnimator.Clear();
                    itemButtons[i] = null;
                }
            }
            itemButtons = null;
        }
        itemButtonTransforms = null;
        if (itemButtonObjects != null)
        {
            for (int i = 0; i < itemButtonObjects.Length; i++)
            {
                buttonObject = itemButtonObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    itemButtonObjects[i] = null;
                }
            }
            itemButtonObjects = null;
        }
        chosenItemIndex   = -1;
        checkingItemIndex = -1;
        firstItemIndex    = -1;
        lastItemIndex     = -1;
    }
Beispiel #6
0
    private void ClearSectionButtons()
    {
        SpritedStringUI buttonText     = null;
        ButtonAnimator  buttonAnimator = null;
        GameObject      buttonObject   = null;

        if (sectionTexts != null)
        {
            for (int i = 0; i < sectionTexts.Length; i++)
            {
                buttonText = sectionTexts[i];
                if (buttonText != null)
                {
                    buttonText.Clear();
                    sectionTexts[i] = null;
                }
            }
            sectionTexts = null;
        }
        if (sectionTextObjects != null)
        {
            for (int i = 0; i < sectionTextObjects.Length; i++)
            {
                buttonObject = sectionTextObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    sectionTextObjects[i] = null;
                }
            }
            sectionTextObjects = null;
        }
        if (sectionButtons != null)
        {
            for (int i = 0; i < sectionButtons.Length; i++)
            {
                buttonAnimator = sectionButtons[i];
                if (buttonAnimator != null)
                {
                    buttonAnimator.Clear();
                    sectionButtons[i] = null;
                }
            }
            sectionButtons = null;
        }
        sectionButtonTransforms = null;
        if (sectionButtonObjects != null)
        {
            for (int i = 0; i < sectionButtonObjects.Length; i++)
            {
                buttonObject = sectionButtonObjects[i];
                if (buttonObject != null)
                {
                    Destroy(buttonObject);
                    sectionButtonObjects[i] = null;
                }
            }
            sectionButtonObjects = null;
        }
        chosenSectionIndex = -1;
    }
Beispiel #7
0
    public virtual void Clear()
    {
        SpritedStringUI textLineComponent = null;
        GameObject      textLineObject    = null;

        if (textLineComponents != null)
        {
            for (int i = 0; i < textLineComponents.Length; i++)
            {
                textLineComponent = textLineComponents[i];
                if (textLineComponent != null)
                {
                    textLineComponent.Clear();
                    textLineComponents[i] = null;
                }
            }
            textLineComponents = null;
        }
        if (textLineTransforms != null)
        {
            for (int i = 0; i < textLineTransforms.Length; i++)
            {
                textLineTransforms[i] = null;
            }
            textLineTransforms = null;
        }
        if (textLineObjects != null)
        {
            for (int i = 0; i < textLineObjects.Length; i++)
            {
                textLineObject = textLineObjects[i];
                if (textLineObject != null)
                {
                    Destroy(textLineObject);
                    textLineObjects[i] = null;
                }
            }
            textLineObjects = null;
        }
        if (textLines != null)
        {
            for (int i = 0; i < textLines.Length; i++)
            {
                textLines[i] = null;
            }
            textLines = null;
        }
        text = null;
        if (pictureObject != null)
        {
            pictureImage = null;
            pictureTrans = null;
            Destroy(pictureObject);
            pictureObject = null;
        }
        picture      = null;
        boxSprite    = null;
        boxImage     = null;
        boxTransform = null;
        if (boxObject != null)
        {
            Destroy(boxObject);
            boxObject = null;
        }
        symbolDatabase = null;
        built          = false;
        cleared        = true;
    }
Beispiel #8
0
    protected virtual void ClearOptions()
    {
        ButtonAnimator  optionComponent = null;
        GameObject      optionObject    = null;
        SpritedStringUI optionText      = null;

        selectedOptionComponent = null;
        optionEffects           = null;
        if (optionComponents != null)
        {
            for (int i = 0; i < optionComponents.Length; i++)
            {
                optionComponent = optionComponents[i];
                if (optionComponent != null)
                {
                    optionComponent.Clear();
                    optionComponents[i] = null;
                }
            }
            optionComponents = null;
        }
        if (optionTransforms != null)
        {
            for (int i = 0; i < optionTransforms.Length; i++)
            {
                optionTransforms[i] = null;
            }
            optionTransforms = null;
        }
        if (optionObjects != null)
        {
            for (int i = 0; i < optionObjects.Length; i++)
            {
                optionObject = optionObjects[i];
                if (optionObject != null)
                {
                    Destroy(optionObject);
                    optionObjects[i] = null;
                }
            }
            optionObjects = null;
        }
        if (optionTexts != null)
        {
            for (int i = 0; i < optionTexts.Length; i++)
            {
                optionText = optionTexts[i];
                if (optionText != null)
                {
                    optionText.Clear();
                    optionTexts[i] = null;
                }
            }
            optionTexts = null;
        }
        if (optionTextObjects != null)
        {
            for (int i = 0; i < optionTextObjects.Length; i++)
            {
                optionObject = optionTextObjects[i];
                if (optionObject != null)
                {
                    Destroy(optionObject);
                    optionTextObjects[i] = null;
                }
            }
            optionTextObjects = null;
        }
        currentValidModels              = 0;
        currentValidOptionModels        = null;
        currentValidOptionScales        = null;
        currentValidOptionChoiceEffects = null;
        currentValidOptionEventIDs      = null;
    }
Beispiel #9
0
 public void ClearVisualRepresentation(bool immediately)
 {
     if (!graphicsCleared)
     {
         if (overlayDark || immediately)
         {
             if (titleText != null)
             {
                 titleText.Clear();
                 titleText = null;
             }
             if (titleTextObject != null)
             {
                 Destroy(titleTextObject);
                 titleTextObject = null;
             }
             if (titleComponent != null)
             {
                 titleComponent.Clear();
                 titleComponent = null;
             }
             titleTransform = null;
             if (titleObject != null)
             {
                 Destroy(titleObject);
                 titleObject = null;
             }
             selectedQuitComponent = null;
             if (quitText != null)
             {
                 quitText.Clear();
                 quitText = null;
             }
             if (quitTextObject != null)
             {
                 Destroy(quitTextObject);
                 quitTextObject = null;
             }
             if (quitComponent != null)
             {
                 quitComponent.Clear();
                 quitComponent = null;
             }
             quitTransform = null;
             if (quitObject != null)
             {
                 Destroy(quitObject);
                 quitObject = null;
             }
             ClearOptions();
             if (optionsParent != null)
             {
                 optionsParentTransform = null;
                 Destroy(optionsParent);
                 optionsParent = null;
             }
             if (!immediately && (imageOverlayComponent != null))
             {
                 overlayFadeSpeed = -overlayFadeSpeedRef;
             }
             else
             {
                 overlayDark  = false;
                 overlayClear = true;
             }
         }
         if (overlayClear)
         {
             if (imageOverlayObject != null)
             {
                 imageOverlayComponent = null;
                 Destroy(imageOverlayObject);
                 imageOverlayObject = null;
             }
             graphicsCleared = true;
             if (immediately)
             {
                 requiringProgress    = false;
                 selectedChoiceEffect = ChoiceEffect.None;
             }
         }
     }
 }