Example #1
0
 public NormalTimeEventWrap(TimeTventType type, float time, System.Action <float, float> update = null, System.Action finish = null)
 {
     this.type = type;
     totalTime = time;
     lifeTime  = totalTime;
     if (update != null)
     {
         updateList.Add(update);
     }
     if (finish != null)
     {
         finishList.Add(finish);
     }
     TimeEventMgr.Instance.add(this);
 }
Example #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);
    }