Beispiel #1
0
    public void add(TimeEventWrap wrap)
    {
        if (wrap == null)
        {
            return;
        }
        List <TimeEventWrap> wrapList = null;

        switch (wrap.type)
        {
        case TimeTventType.Normal:
            wrapList = normalList;
            break;

        case TimeTventType.Server:
            wrapList = serverList;
            break;

        case TimeTventType.Client:
            wrapList = clientList;
            break;

        default:
            break;
        }
        if (wrapList != null && !wrapList.Contains(wrap))
        {
            wrapList.Add(wrap);
        }
    }
Beispiel #2
0
    public TimeEventWrap SetTimeWrap(TimeTventType type, float time, System.Action <float, float> update = null, System.Action finish = null)
    {
        TimeEventWrap wrap = null;

        switch (type)
        {
        case TimeTventType.Normal:
            wrap = new NormalTimeEventWrap(type, time, update, finish);
            break;

        //case TimeTventType.Server:
        //    wrap = new ServerTimeEventWrap(type, time, update, finish);
        //    break;
        //case TimeTventType.Client:
        //wrap = new ClientTimeEventWrap(type, time, update, finish);
        //break;
        default:
            break;
        }
        return(wrap);
    }
Beispiel #3
0
 public void DeleteWrap(TimeEventWrap wrap)
 {
     remove(wrap);
 }