//解析模板数据
    public override void parseSample(int sid)
    {
        FestivalFireworksSample sample = new FestivalFireworksSample();
        string dataStr = getSampleDataBySid(sid);

        sample.parse(sid, dataStr);
        samples.Add(sid, sample);
    }
 //有大小限制的选择
 public void init(FestivalFireworksSample sample, CallBack <int, Prop> callback)
 {
     this.callback       = callback;
     this.sid            = sample.prizes.pSid;
     this.descLabel.text = sample.exchangeSample.describe;
     this.max            = getNumberMax();
     this.min            = getNumberMin();
     initIcon();
 }
Beispiel #3
0
 /// <summary>
 /// 初始化UI
 /// </summary>
 public void initItemUI(FestivalFireworksSample fireworksSample, WindowBase win)
 {
     this.win                 = win;
     this.fireworksSample     = fireworksSample;
     this.itemSid             = fireworksSample.noitceItemSid;
     this.fireworksSid        = fireworksSample.prizes.pSid;
     this.fireworksLabel.text = QualityManagerment.getQualityColor(fireworksSample.prizes.getQuality()) + fireworksSample.prizes.getPrizeName();
     fireworks.init(fireworksSample.prizes);
     fireworks.rightBottomText.text = "x" + getPropsNum(fireworksSid);
     fireworks.fatherWindow         = win;
     initButton();
 }
Beispiel #4
0
    //有大小限制的选择
    public void init(FestivalFireworksSample sample, CallBack <int, int> callback)
    {
        this.sample   = sample;
        this.callback = callback;
        this.exchange = sample.exchangeSample;
        this.sid      = sample.noitceItemSid;
        int numberMax = getNumberMax();
        int numberMin = getNumberMin();
        int costType  = getCostType();

        materialNum = exchange.conditions[0].Length;
        setCurrentPropNum();
        initIcon();
        init(numberMax, numberMin, 1, 1, costType);
    }