//[不需要每秒時間] 可取消修改 public byte SetCountDown(methods _function, float a) { if (numberPlate < 230) { numberPlate++; } else { numberPlate = 0; } tmpFunction = new TmpFunction(a, a + (float)timeToStart, _function, numberPlate); myTasks.Add(tmpFunction); allTaskAmount = myTasks.Count; return(numberPlate); }
//[需要每秒時間] public byte SetCountDown(methods _function, float a, Text _text, Image _img) { //號碼牌從1開始 if (numberPlate < 230) { numberPlate++; } else { numberPlate = 0; } tmpFunction = new TmpFunction(a, a + (float)timeToStart, _function, _text, _img, numberPlate); myTasks.Add(tmpFunction); allTaskAmount = myTasks.Count; return(numberPlate); }
//[需要每秒時間] 可取消修改 但bar條從0到1(Bar條反轉) public byte SetCountDownReveres(methods _function, float a, Image _img) { //號碼牌從1開始 if (numberPlate < 230) { numberPlate++; } else { numberPlate = 0; } tmpFunction = new TmpFunction(a, a + (float)timeToStart, _function, null, _img, numberPlate); tmpFunction.reverseBar = true; myTasks.Add(tmpFunction); allTaskAmount = myTasks.Count; return(numberPlate); }
//[不需要每秒時間]不可取消修改 public void SetCountDownNoCancel(methods _function, float a) { tmpFunction = new TmpFunction(a, a + (float)timeToStart, _function, 255); myTasks.Add(tmpFunction); allTaskAmount = myTasks.Count; }