Пример #1
0
 public void UpdateConfigure(KSKitConfigure conf)
 {
     configure = new KSNavigatorBarConfigure
     {
         key = conf.key,
     };
 }
Пример #2
0
 /*
  * public void ToRootCtrl()
  * {
  *  while (canvas_stack.Count > 1)
  *  {
  *      KSCanvas canvas = canvas_stack.Pop();
  *      GameObject.Destroy(canvas.gameObject);
  *  }
  * }
  *
  * public void ToCtrl(string key)
  * {
  *  foreach (KSCanvas canvas in canvas_stack)
  *  {
  *      if (canvas.configure.key == key)
  *      {
  *          bool isPop = true;
  *          while (isPop)
  *          {
  *              KSCanvas temp = canvas_stack.Pop();
  *              GameObject.Destroy(temp.gameObject);
  *              if (temp.configure.key == key)
  *              {
  *                  isPop = false;
  *                  if (canvas_stack.Count == 0)
  *                  {
  *                      camera_manager.DestroyCamera();
  *                  }
  *                  return;
  *              }
  *          }
  *      }
  *  }
  * }
  *
  * public void ToCtrl<T>() where T : KSWindow
  * {
  *  string key = typeof(T).Name;
  *  ToCtrl(key);
  * }
  */
 public void PopCtrl(KSNavigatorBarConfigure configure)
 {
     if (canvas_stack.Count > 0)
     {
         KSCanvas canvas = canvas_stack.Peek();
         if (canvas.configure.key == configure.key)
         {
             canvas = canvas_stack.Pop();
             Object.Destroy(canvas.gameObject);
             if (canvas_stack.Count == 0)
             {
                 camera_manager.DestroyCamera();
             }
             else
             {
                 // 新CameraCullingMask
                 camera_manager.UpdateCameraCullingMask(canvas_stack);
             }
         }
     }
 }