static public void SelectCom(GKToyNode node, GKToyData data)
        {
            switch (node.doubleClickType)
            {
            // Task.
            case 0:
                GKToyMakerTaskCom.PopupTaskWindow();
                GKToyMakerTaskCom.InitSubData((GKToyTask)node, data);
                break;

            // Interact Task.
            case 1:
                GKToyMakerSubInteractCom.PopupTaskWindow();
                GKToyMakerSubInteractCom.InitSubData((GKToySubTaskInteract)node, data);
                break;

            // Hunt Task.
            case 2:
                GKToyMakerSubHuntingCom.PopupTaskWindow();
                GKToyMakerSubHuntingCom.InitSubData((GKToySubTaskHunting)node, data);
                break;

            // Collect Task.
            case 4:
                GKToyMakerSubCollectCom.PopupTaskWindow();
                GKToyMakerSubCollectCom.InitSubData((GKToySubTaskCollect)node, data);
                break;

            default:
                break;
            }
        }
예제 #2
0
 public static void PopupTaskWindow()
 {
     instance = GetWindow <GKToyMakerTaskCom>(GKToyTaskMaker._GetTaskLocalization("Main Task Config"), true);
     _styleCenrer.alignment = TextAnchor.MiddleCenter;
     _styleRight.alignment  = TextAnchor.MiddleRight;
     _contentIndex          = 0;
     instance._task         = null;
 }
예제 #3
0
 void OnEnable()
 {
     if (null == instance)
     {
         instance       = GetWindow <GKToyMakerTaskCom>("", true);
         wantsMouseMove = true;
         minSize        = new Vector2(GKToyTaskMaker.Instance.ToyMakerBase._minWidth - 500, GKToyTaskMaker.Instance.ToyMakerBase._minHeight - 300);
         maxSize        = new Vector2(GKToyTaskMaker.Instance.ToyMakerBase._minWidth - 500, GKToyTaskMaker.Instance.ToyMakerBase._minHeight - 300);
         for (int i = 0; i < instance._strContent.Length; ++i)
         {
             instance._strContent[i] = GKToyTaskMaker._GetTaskLocalization(instance._strContent[i]);
         }
     }
 }
예제 #4
0
 void OnDestroy()
 {
     instance = null;
 }