示例#1
0
    /// <summary>
    ///
    /// Initialises the tutor draw UI
    ///
    /// </summary>
    public void InitTutorDraw(CardFunctionUI _cardFunctionUI)
    {
        CardFunctionUI = _cardFunctionUI;

        //Sets the list of dropdown fields and input fields
        dropdownFields = new List <TMP_Dropdown>
        {
            rarityDropdown,
            classDropdown,
            tagDropdown,
            resourceDropdown,
            typeDropdown,
            costFilterDropdown,
            attackFilterDropdown,
            healthFilterDropdown,
            rangeFilterDropdown,
            speedFilterDropdown,
            spellRangeFilterDropdown,
            durabilityFilterDropdown
        };
        inputFields = new List <TMP_InputField>
        {
            nameInput,
            costInput,
            attackInput,
            healthInput,
            rangeInput,
            speedInput,
            spellRangeInput,
            durabilityInput,
        };

        //Initialises the dropdowns on the UI
        GeneralUIExtensions.InitDropdownOfType(rarityDropdown, new List <Rarity> {
            Rarity.Default, Rarity.Deleted, Rarity.Hero, Rarity.NPCHero
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(classDropdown, new List <Classes.ClassList> {
            Classes.ClassList.Default
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(tagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_DROPDOWN_STRING, true);
        GeneralUIExtensions.InitDropdownOfType(resourceDropdown, new List <CardResources> {
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(typeDropdown, new List <CardTypes> {
            CardTypes.Default
        }, DEFAULT_DROPDOWN_STRING);

        var removedIntValueFilter = new List <IntValueFilter> {
            IntValueFilter.None
        };

        GeneralUIExtensions.InitDropdownOfType(costFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(attackFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(healthFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(rangeFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(speedFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(spellRangeFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(durabilityFilterDropdown, removedIntValueFilter, DEFAULT_DROPDOWN_STRING);
    }
示例#2
0
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(attackModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(healthModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(rangeModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(speedModTypeDropdown, new List <StatModifierTypes>());

        GeneralUIExtensions.InitDropdownOfType(tagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_DROPDOWN_STRING, true);
        tagDropdown.interactable = GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay;

        nameInput.text        = "";
        attackValueInput.text = "";
        healthValueInput.text = "";
        rangeValueInput.text  = "";
        speedValueInput.text  = "";
        createdByInput.text   = "";
        numToCreateInput.text = "";

        titleText.text = defaultTitleText;
        createdByInput.placeholder.color = new Color(0.2f, 0.2f, 0.2f, 0.5f);

        activeOwnerToggle.isOn      = true;
        isChoiceToggle.interactable = GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay;
        isChoiceToggle.isOn         = false;
        includeUncollectablesToggle.interactable = GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay;
        includeUncollectablesToggle.isOn         = GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay;
    }
示例#3
0
    public override void InitialiseEffectUI(EffectsBarUI.EffectTypes _effectType, GameplayUI _gameplayUI, EffectsBarUI _effectBarUI)
    {
        base.InitialiseEffectUI(_effectType, _gameplayUI, _effectBarUI);

        GeneralUIExtensions.InitDropdownOfType(recruitTypeDropdown, new List <RecruitTypes>());

        ResetState();
    }
    public override void InitialiseEffectUI(EffectsBarUI.EffectTypes _effectType, GameplayUI _gameplayUI, EffectsBarUI _effectBarUI)
    {
        base.InitialiseEffectUI(_effectType, _gameplayUI, _effectBarUI);

        GeneralUIExtensions.InitDropdownOfType(tileStatusDropdown, new List <TileStatuses>(), orderAlphabetical: true);

        ResetState();
    }
示例#5
0
    /// <summary>
    ///
    /// Clears the enchantment fields back to their default state
    ///
    /// </summary>
    private void ClearEnchantmentFields()
    {
        GeneralUIExtensions.InitDropdownOfType(attackModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(healthModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(rangeModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(speedModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(empoweredModTypeDropdown, new List <StatModifierTypes>());

        attackValueInput.text    = "";
        healthValueInput.text    = "";
        rangeValueInput.text     = "";
        speedValueInput.text     = "";
        empoweredValueInput.text = "";
    }
示例#6
0
 /// <summary>
 ///
 /// Initialises the filter dropdowns with their particular options
 ///
 /// </summary>
 private void InitDropdowns()
 {
     GeneralUIExtensions.InitDropdownOfType(classplayableDropdown, new List <Classes.ClassList> {
         Classes.ClassList.Default, Classes.ClassList.Token
     }, DEFAULT_DROPDOWN_STRING);
     GeneralUIExtensions.InitDropdownOfType(cardTypeDropdown, new List <CardTypes>()
     {
         CardTypes.Default
     }, DEFAULT_DROPDOWN_STRING);
     GeneralUIExtensions.InitDropdownOfType(rarityDropdown, new List <Rarity>()
     {
         Rarity.Default, Rarity.Hero, Rarity.NPCHero, Rarity.Uncollectable, Rarity.Deleted
     }, DEFAULT_DROPDOWN_STRING);
     GeneralUIExtensions.InitDropdownOfType(setDropdown, new List <Sets>()
     {
         Sets.Default
     }, DEFAULT_DROPDOWN_STRING);
 }
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(affectedCardTypeDropdown, new List <CardTypes> {
            CardTypes.Default
        }, DEFAULT_INPUT_STRING_ANY);
        GeneralUIExtensions.InitDropdownOfType(affectedTagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_INPUT_STRING_ANY, true);
        GeneralUIExtensions.InitDropdownOfType(affectedUnitTagDropdown, new List <UnitTags> {
            UnitTags.Default
        }, DEFAULT_INPUT_STRING_ANY, true);

        GeneralUIExtensions.InitDropdownOfType(attackModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(healthModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(rangeModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(speedModTypeDropdown, new List <StatModifierTypes>());

        GeneralUIExtensions.InitDropdownOfType(costResourceDropdown, new List <CardResources>()
        {
            CardResources.Neutral
        }, DEFAULT_INPUT_STRING_NONE);
        GeneralUIExtensions.InitDropdownOfType(specialPassiveValueDropdown, new List <SpecialPassiveEffects>()
        {
        }, DEFAULT_INPUT_STRING_NONE, true);

        playerNumberDropdown.ClearOptions();
        playerNumberDropdown.AddOptions(GameManager.instance.LoadedPlayers.Select(x => (x.Id + 1).ToString()).ToList());
        playerNumberDropdown.gameObject.SetActive(GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Setup);

        nameInput.text        = "";
        costValueInput.text   = "";
        minCostInput.text     = "";
        greaterThanInput.text = "";
        attackValueInput.text = "";
        healthValueInput.text = "";
        rangeValueInput.text  = "";
        speedValueInput.text  = "";
        speedValueInput.text  = "";

        titleText.text = defaultTitleText;

        isTemporaryToggle.isOn         = false;
        isTemporaryToggle.interactable = GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay;
    }
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(typeDropdown, new List <EnchantmentType>()
        {
            EnchantmentType.StatusEffects
        });
        GeneralUIExtensions.InitDropdownOfType(statusDropdown, new List <UnitEnchantment.EnchantmentStatus>()
        {
            UnitEnchantment.EnchantmentStatus.None,
            UnitEnchantment.EnchantmentStatus.Base,
        });

        GeneralUIExtensions.InitDropdownOfType(attackModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(healthModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(rangeModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(speedModTypeDropdown, new List <StatModifierTypes>());
        GeneralUIExtensions.InitDropdownOfType(empoweredModTypeDropdown, new List <StatModifierTypes>());

        GeneralUIExtensions.InitDropdownOfType(keywordDropdown, new List <Keywords>()
        {
            Keywords.Summon
        });
        GeneralUIExtensions.InitDropdownOfType(statusEffectDropdown,
                                               new List <Unit.StatusEffects>()
        {
            Unit.StatusEffects.None, Unit.StatusEffects.Spellbound, Unit.StatusEffects.Rooted, Unit.StatusEffects.Stunned, Unit.StatusEffects.Transformed,
        });

        GameManager.DestroyAllChildren(keywordListParent);
        GameManager.DestroyAllChildren(statusEffectListParent);

        attackValueInput.text    = "";
        healthValueInput.text    = "";
        rangeValueInput.text     = "";
        speedValueInput.text     = "";
        empoweredValueInput.text = "";
        sourceInput.text         = "";

        keywordList      = new List <EnchantmentEffectListObject>();
        statusEffectList = new List <EnchantmentEffectListObject>();

        ChangeEnchantmentType();
    }
示例#9
0
    /// <summary>
    ///
    /// Initialises the tutor draw UI
    ///
    /// </summary>
    public void InitGenerateCard(CardFunctionUI _cardFunctionUI, Classes.ClassList playerClass)
    {
        CardFunctionUI = _cardFunctionUI;
        PlayerClass    = playerClass;

        ClearEnchantmentFields();
        unitEnchantmentArea.SetActive(false);

        //Sets the list of dropdown fields and input fields
        dropdownFields = new List <TMP_Dropdown>
        {
            classDropdown,
            tagDropdown,
            resourceDropdown,
            typeDropdown,
            positionDropdown,
            modifyCostDropdown,
        };
        inputFields = new List <TMP_InputField>
        {
            nameInput,
            numToGenerateInput,
            createdByInput,
            modifyCostInput,
        };

        //Initialises the dropdowns on the UI
        GeneralUIExtensions.InitDropdownOfType(classDropdown, new List <Classes.ClassList> {
            Classes.ClassList.Default
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(tagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_DROPDOWN_STRING, true);
        GeneralUIExtensions.InitDropdownOfType(resourceDropdown, new List <CardResources> {
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(typeDropdown, new List <CardTypes> {
            CardTypes.Default
        }, DEFAULT_DROPDOWN_STRING);
        GeneralUIExtensions.InitDropdownOfType(positionDropdown, new List <DeckPositions>());

        GeneralUIExtensions.InitDropdownOfType(modifyCostDropdown, new List <CardResources> {
        }, MODIFY_COST_DEFAULT_DROPDOWN_STRING);
    }
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(durabilityModTypeDropdown, new List <StatModifierTypes>());

        GeneralUIExtensions.InitDropdownOfType(tagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_DROPDOWN_STRING, true);

        nameInput.text            = "";
        durabilityValueInput.text = "";
        createdByInput.text       = "";
        numToChooseInput.text     = "";

        titleText.text = defaultTitleText;
        createdByInput.placeholder.color = new Color(0.2f, 0.2f, 0.2f, 0.5f);

        activeOwnerToggle.isOn           = true;
        isChoiceToggle.isOn              = false;
        includeUncollectablesToggle.isOn = true;
    }
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(statTypeDropdown, new List <StatModifierTypes>()
        {
            StatModifierTypes.None
        });
        GeneralUIExtensions.InitDropdownOfType(targetDropdown, new List <CardTypes>()
        {
            CardTypes.Default
        }, DEFAULT_TARGET_STRING);
        GeneralUIExtensions.InitDropdownOfType(resourceDropdown, new List <CardResources>()
        {
            CardResources.Neutral
        }, DEFAULT_RESOURCE_STRING, true);

        costInput.text              = "";
        minCostInput.text           = "";
        mustBeGreaterThanInput.text = "";
        targetDropdown.value        = 0;
        resourceDropdown.value      = 0;
        statTypeDropdown.value      = 0;
    }
    private void ClearFields()
    {
        GeneralUIExtensions.InitDropdownOfType(tagDropdown, new List <Tags> {
            Tags.Default
        }, DEFAULT_DROPDOWN_STRING, true);
        GeneralUIExtensions.InitDropdownOfType(typeDropdown, new List <CardTypes> {
            CardTypes.Default
        }, DEFAULT_DROPDOWN_STRING);

        nameInput.text        = "";
        numToCreateInput.text = "";
        createdByInput.text   = "";

        titleText.text = defaultTitleText;
        createdByInput.placeholder.color = new Color(0.2f, 0.2f, 0.2f, 0.5f);

        activeOwnerToggle.isOn = true;
        isDeployToggle.isOn    = false;
        isCopyToggle.isOn      = false;
        isChoiceToggle.isOn    = false;

        IsDeployToggleState();
    }