Example #1
0
    protected StoryEditorPanel_LevelButtonSliderBar AddSlider(string labelStrKey, Color color)
    {
        StoryEditorPanel_LevelButtonSliderBar slider = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.StoryEditorPanel_LevelButtonSliderBar].AllocateGameObject <StoryEditorPanel_LevelButtonSliderBar>(SliderBarContainer);

        slider.Initialize(labelStrKey, color);
        Sliders.Add(slider);
        return(slider);
    }
Example #2
0
 protected override void ChildrenInitialize()
 {
     CardCountSlider = AddSlider("StoryEditorPanel_ShopItemCountLabelText", CardCountSliderColor);
     CardCountSlider.SetValueText(((Shop)Cur_Level).ShopItems.Count.ToString());
     CardCountSlider.ChangeSliderValue((float)((Shop)Cur_Level).ShopItems.Count / 20);
     AVGPriceSlider = AddSlider("StoryEditorPanel_ShopItemAVGPriceLabelText", AVGPriceSliderColor);
     AVGPriceSlider.SetValueText(((Shop)Cur_Level).AVGPrice.ToString());
     CardCountSlider.ChangeSliderValue((float)((Shop)Cur_Level).AVGPrice / 200);
 }
    protected override void ChildrenInitialize()
    {
        CardCountSlider = AddSlider("StoryEditorPanel_CardCountLabelText", CardCountSliderColor);
        CardCountSlider.SetValueText(((Enemy)Cur_Level).BuildInfo.CardCount.ToString());
        CardCountSlider.ChangeSliderValue((float)((Enemy)Cur_Level).BuildInfo.CardCount / 50);

        LifeSlider = AddSlider("StoryEditorPanel_LifeLabelText", LifeSliderColor);
        LifeSlider.SetValueText(((Enemy)Cur_Level).BuildInfo.Life.ToString());
        SetLifeBarLengthColor(((Enemy)Cur_Level).BuildInfo.Life);

        EnergySlider = AddSlider("StoryEditorPanel_EnergyLabelText", EnergySliderColor);
        EnergySlider.SetValueText(((Enemy)Cur_Level).BuildInfo.Energy.ToString());
        SetEnergyBarLengthColor(((Enemy)Cur_Level).BuildInfo.Energy);

        DrawCardNumText.text   = ((Enemy)Cur_Level).BuildInfo.DrawCardNum.ToString();
        BeginMetalNumText.text = ((Enemy)Cur_Level).BuildInfo.BeginMetal.ToString();
    }