Ejemplo n.º 1
0
    private int GetTimeWeight(int activityId)
    {
        HuoDongZhongXin activityInfo = DataReader <HuoDongZhongXin> .Get(activityId);

        ActiveCenterInfo.ActiveStatus.AS status = ActivityCenterManager.infoDict.get_Item(activityId).status;
        if (status == ActiveCenterInfo.ActiveStatus.AS.Wait || status == ActiveCenterInfo.ActiveStatus.AS.NotOpen || status == ActiveCenterInfo.ActiveStatus.AS.Close)
        {
            return(this.GetOpenTimeStart(activityInfo));
        }
        return(-1);
    }
Ejemplo n.º 2
0
 private int GetStateWeight(int activityId)
 {
     ActiveCenterInfo.ActiveStatus.AS   status = ActivityCenterManager.infoDict.get_Item(activityId).status;
     ActiveCenterInfo.ActiveStatus.AS[] array  = new ActiveCenterInfo.ActiveStatus.AS[]
     {
         ActiveCenterInfo.ActiveStatus.AS.Start,
         ActiveCenterInfo.ActiveStatus.AS.PrepareOpen,
         ActiveCenterInfo.ActiveStatus.AS.Wait,
         ActiveCenterInfo.ActiveStatus.AS.NotOpen,
         ActiveCenterInfo.ActiveStatus.AS.Close
     };
     for (int i = 0; i < array.Length; i++)
     {
         if (status == array[i])
         {
             return(i);
         }
     }
     return(-1);
 }
Ejemplo n.º 3
0
    private void SetActivityWithState(Transform cell, int activityId, ActiveCenterInfo.ActiveStatus.AS activityState)
    {
        this.Reset(cell);
        HuoDongZhongXin huoDongZhongXin = DataReader <HuoDongZhongXin> .Get(activityId);

        if (activityState == ActiveCenterInfo.ActiveStatus.AS.NotOpen)
        {
            cell.Find("imgLock").get_gameObject().SetActive(true);
            cell.Find("imgLock").Find("txtRequireLv").GetComponent <Text>().set_text(huoDongZhongXin.minLv + "级开启");
        }
        else if (activityState == ActiveCenterInfo.ActiveStatus.AS.Wait || activityState == ActiveCenterInfo.ActiveStatus.AS.PrepareOpen)
        {
            cell.Find("txtOprate").GetComponent <Text>().set_text("时间未到");
        }
        else if (activityState == ActiveCenterInfo.ActiveStatus.AS.Start)
        {
            cell.Find("txtOprate").GetComponent <Text>().set_text("点击参加");
            cell.Find("txtOprate").GetComponent <Text>().set_color(Color.get_green());
        }
        else if (activityState == ActiveCenterInfo.ActiveStatus.AS.Close)
        {
            cell.Find("txtOprate").GetComponent <Text>().set_text("已经结束");
        }
    }