예제 #1
0
    private void GenerateNode(int nodeLocationIndex)
    {
        ChapterMapNode cmn = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.ChapterMapNode].AllocateGameObject <ChapterMapNode>(ChapterMapNodesTransform);

        cmn.AdjacentRoutes.Clear();
        ChapterMapNodes.Add(nodeLocationIndex, cmn);
        cmn.transform.localPosition = nodeLocations[nodeLocationIndex];
    }
예제 #2
0
    public void UnSelectAllNode()
    {
        foreach (KeyValuePair <int, ChapterMapNode> kv in ChapterMapNodes)
        {
            kv.Value.IsSelected = false;
        }

        Cur_SelectedNode = null;
    }
예제 #3
0
 private void OnHoverNode(ChapterMapNode node)
 {
     foreach (KeyValuePair <int, ChapterMapNode> kv in ChapterMapNodes)
     {
         if (kv.Value != node)
         {
             kv.Value.IsHovered = false;
         }
     }
 }
예제 #4
0
    private void SelectNode(int nodeIndex)
    {
        if (ChapterMapNodes[nodeIndex].IsBeated)
        {
            return;
        }

        foreach (KeyValuePair <int, ChapterMapNode> kv in ChapterMapNodes)
        {
            kv.Value.IsSelected = false;
        }

        ChapterMapNodes[nodeIndex].IsSelected = true;
        Cur_SelectedNode = ChapterMapNodes[nodeIndex];
        OnSelectChapterNode?.Invoke(Cur_SelectedNode);
    }
예제 #5
0
    private void SelectNode(ChapterMapNode node)
    {
        StartButton.gameObject.SetActive(true);
        StartButton.onClick.RemoveAllListeners();
        StartButton.onClick.AddListener(delegate
        {
            if (node.Cur_Level != null)
            {
                if (node.IsBeated)
                {
                    NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("StoryPanel_CannotStartBeatedLevel"), 0, 1f);
                }
                else
                {
                    switch (node.Cur_Level)
                    {
                    case Enemy enemy:
                        {
                            UnityAction action = delegate { UIManager.Instance.GetBaseUIForm <StartMenuPanel>().StartGameCore(RoundManager.PlayMode.Single, Cur_ChapterMap.Cur_Chapter.ChapterID, node.Cur_Level.LevelID); };
                            action.Invoke();
                            CurrentStartGameAction = action;
                            break;
                        }

                    case Shop shop:
                        {
                            StandaloneStartLevelRequest request = new StandaloneStartLevelRequest(Client.Instance.Proxy.ClientID, -1, Cur_ChapterMap.Cur_Chapter.ChapterID, node.Cur_Level.LevelID);
                            Client.Instance.Proxy.SendMessage(request);
                            break;
                        }
                    }
                }
            }
            else
            {
                ConfirmPanel cp = UIManager.Instance.ShowUIForms <ConfirmPanel>();
                cp.Initialize(LanguageManager.Instance.GetText("Notice_SelectEmptyLevel"),
                              LanguageManager.Instance.GetText("Common_Confirm"),
                              null,
                              delegate { cp.CloseUIForm(); },
                              null);
            }
        });