private void process() { if (this._isProcessing) { return; } this._isProcessing = true; bool flag0, flag1; while (true) { this._curResultList.AddRange(this._nextResultList); this._nextResultList.Clear(); this._curEventList.AddRange(this._nextEventList); this._nextEventList.Clear(); flag0 = this.excuteResults(); flag1 = this.processInstantEvent(); if (!flag0 && !flag1) { break; } } this._isProcessing = false; if ( this._onProcessComplete != null ) { this._onProcessComplete(); } BattleGlobal.Core.battleInfo.isProcessingComplete = true; this._onProcessComplete = null; Debug.Log("Processing All Complete!"); }
public void startProcess(ProcessCompleteHandler callback=null) { if ( !this._isProcessing ) { if ( callback != null ) { this._onProcessComplete += callback; } BattleGlobal.Core.battleInfo.isProcessingComplete = false; this._isGettingStarted = true; } }