public void ClearEot() { //_eotList.Clear(); foreach (Eot tmp in _eotList) { if (tmp.IsActive) { #if xingtianbo switch (Eot.GetTimeType(tmp)) { //will last for all combat case Eot.EOT_TYPE.COMBAT: break; case Eot.EOT_TYPE.TEMP: tmp.IsActive = false; RefreshEffect(tmp, Eot.EOT_EVENT.END); break; } #endif tmp.IsActive = false; RefreshEffect(tmp, Eot.EOT_EVENT.END); } } }
public void UpdateEot() { bool ret = false; _timeCounter += Time.deltaTime; if (_timeCounter > FCConst.EOT_REFRESH_TIME) { _timeCounter -= FCConst.EOT_REFRESH_TIME; foreach (Eot tmp in _eotList) { if (tmp.IsActive) { #if xingtianbo switch (Eot.GetTimeType(tmp)) { //will last for all combat case Eot.EOT_TYPE.COMBAT: break; case Eot.EOT_TYPE.TEMP: tmp.JumpCount--; tmp._lastTime -= 1; RefreshEffect(tmp, Eot.EOT_EVENT.REFRESH); break; } if (tmp.JumpCount <= 0) { tmp.IsActive = false; RefreshEffect(tmp, Eot.EOT_EVENT.END); } else { ret = true; } #endif tmp.JumpCount--; tmp.lastTime -= 1; RefreshEffect(tmp, Eot.EOT_EVENT.REFRESH); if (tmp.JumpCount <= 0) { tmp.IsActive = false; RefreshEffect(tmp, Eot.EOT_EVENT.END); } else { ret = true; } } } } else { ret = true; } if (!ret) { _eotList.Clear(); _eotFlag = 0; } }