public void Initial(ResGameTask config, GameTaskSys rootSys) { this._rootSys = rootSys; this._config = config; this._current = 0; this._timer = 0; this._readyTimer = 0; this._ownerGroups = null; this._state = GameTask.State.AWAKE; DebugHelper.Assert(null != this._config, "GameTask.config must not be null!"); this.OnInitial(); }
private GameTask CreateTask(uint taskId) { ResGameTask dataByKey = this._taskDB.GetDataByKey(taskId); if (dataByKey != null) { string text = Utility.UTF8Convert(dataByKey.szType); GameTask gameTask; if ("Group" == text) { gameTask = new GameTaskGroup(); } else { gameTask = (GameTask)Assembly.GetExecutingAssembly().CreateInstance(this._classSpace + ".GameTask" + text); } gameTask.Initial(dataByKey, this); return(gameTask); } return(null); }
private GameTask CreateTask(uint taskId) { ResGameTask dataByKey = this._taskDB.GetDataByKey(taskId); if (dataByKey == null) { return(null); } GameTask task2 = null; string str = Utility.UTF8Convert(dataByKey.szType); if ("Group" == str) { task2 = new GameTaskGroup(); } else { task2 = (GameTask)Assembly.GetExecutingAssembly().CreateInstance(this._classSpace + ".GameTask" + str); } task2.Initial(dataByKey, this); return(task2); }