예제 #1
0
 // 推进剧情
 public virtual int PushIndex(int?index = null)
 {
     if (index == null)
     {
         CurPlotIndex++;
     }
     else
     {
         if (index.Value != (CurPlotIndex + 1))
         {
             CLog.Error("错误!!剧情没有线性推进,PushIndex必须线性推进,否则可以使用SetIndex");
         }
         CurPlotIndex = index.Value;
     }
     Callback_OnChangePlotIndex?.Invoke(CurPlotIndex);
     return(CurPlotIndex);
 }
예제 #2
0
 //直接设置剧情Index
 public void SetIndex(int index)
 {
     CurPlotIndex = index;
     Callback_OnChangePlotIndex?.Invoke(CurPlotIndex);
 }