예제 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
예제 #2
0
파일: LevelChange.cs 프로젝트: GotoK/H401
    // Use this for initialization
    void Start()
    {
        Instantiate(Resources.Load<GameObject>(fieldMapPath)).transform.SetParent(transform);
        GameObject lPanel = Instantiate(Resources.Load<GameObject>(levelPanelPath));

        lPanel.transform.SetParent(transform);

        _mapFields = GetComponentsInChildren<MapField>();
        _levelPanel = lPanel.GetComponentInChildren<LevelPanel>();
        _levelPanel.SetLevelController(_levelController);

        mapArrowObj = Instantiate(Resources.Load<GameObject>(mapArrowPath));
        mapArrowObj.transform.SetParent(transform);
        SetArrowRot();

        //mapfieldから各メッシュをエミッションでちかちかさせる
        int i = 0;
        int cLevel = transform.root.gameObject.GetComponent<AppliController>().GetCurrentScene().GetComponent<GameScene>().gameController.nodeController.currentLevel;
        foreach(var mf in _mapFields)
        {
            if (i == cLevel)
                mapArrowObj.transform.position = mf.gameObject.transform.position + new Vector3(0.0f, 1.2f, 0.0f);

            mf.mapNum = i;
            mf.SetColor(true);
            i++;
        }
    }
예제 #3
0
    void Start()
    {
        uISingleton = UISingleton.Instance;
        // Find All UI Objects
        levelPanel = uISingleton.GetComponentInChildren <LevelPanel>();

        UpdateUI();
    }
 private void LevelPanel_LevelEditorExitSelected(int x, int y)
 {
     _levelPanel.LevelEditorExitSelected -= LevelPanel_LevelEditorExitSelected;
     _levelPanel = null;
     ExitX.Text  = x.ToString("X");
     ExitY.Text  = y.ToString("X");
     GlobalPanels.EditLevel(_levelInfo);
 }
예제 #5
0
 public void Play(LevelPanel levelPanel)
 {
     GameDataManager.instance.sceneParam = new MainGameParam()
     {
         levelSData = levelPanel.levelSData
     };
     sceneTransition.FadeIn(playTargetSceneAR);
     OnPlay.Invoke(this);
 }
예제 #6
0
    private void Awake()
    {
        Instance = this;

        rt = GetComponent <RectTransform>();

        shownPos  = rt.anchoredPosition;
        hiddenPos = shownPos + new Vector2(hiddenX, 0);
    }
예제 #7
0
 private void Awake()
 {
     if (levelPanel)
     {
         Destroy(gameObject);
     }
     else
     {
         levelPanel = this;
     }
 }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (LevelList.SelectedItem != null)
     {
         if (LevelList.SelectedItem is LevelInfo)
         {
             _levelPanel = GlobalPanels.EditLevel((LevelInfo)LevelList.SelectedItem);
             _levelPanel.LevelEditorExitSelected += LevelPanel_LevelEditorExitSelected;
         }
     }
 }
예제 #9
0
    static public void SetLevelPanel(int panelIndex, int levelIndex)
    {
        LevelPanel selectedPanel = Instance.encodeSeedCanvas.GetComponentsInChildren <LevelPanel>()[panelIndex];

        selectedPanel.GetComponentsInChildren <Image>(true)[2].gameObject.SetActive(true);
        selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[0].gameObject.SetActive(true);
        selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[1].gameObject.SetActive(true);

        selectedPanel.GetComponentsInChildren <TextMeshProUGUI>()[1].text = LevelSetManager.AllLevels[levelIndex].name;
        selectedPanel.GetComponentsInChildren <Image>()[2].sprite         = LevelSetManager.AllLevels[levelIndex].preview;
    }
예제 #10
0
 void Awake()
 {
     if (instance == null)
     {
         instance     = this;
         levelButtons = new List <LevelButton> ();
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
예제 #11
0
    private void SetupLevels()
    {
        var levels = DataManager.FetchLevels();

        for (int i = 0; i < levels.Count; i++)
        {
            LevelPanel levelPanel = Instantiate(levelPrefab, gridLayout.transform);
            levelPanel.SetLevel(levels[i]);
            levelPanel.OnTapped += OnLevelPanelTapped;
            panels.Add(levelPanel);
        }
    }
예제 #12
0
    static public void HideLevelPanel(int panelIndex)
    {
        if (panelIndex >= 6)
        {
            return;
        }

        LevelPanel selectedPanel = Instance.encodeSeedCanvas.GetComponentsInChildren <LevelPanel>()[panelIndex];

        selectedPanel.GetComponentsInChildren <Image>(true)[2].gameObject.SetActive(false);
        selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[0].gameObject.SetActive(false);
        selectedPanel.GetComponentsInChildren <TextMeshProUGUI>(true)[1].gameObject.SetActive(false);
    }
예제 #13
0
        void Awake()
        {
            if (m_LeaderboardPanel == null)
            {
                m_LeaderboardPanel = FindObjectOfType <LeaderboardPanel>();
            }
            if (m_ConfirmLogoutPanel == null)
            {
                m_ConfirmLogoutPanel = FindObjectOfType <ConfirmLogoutPanel>();
            }

            // show login panels
            if (m_LoginSignupPanels == null)
            {
                m_LoginSignupPanels = FindObjectOfType <LoginSignUpPanels>();
            }
            if (m_LoginSignupPanels)
            {
                m_LoginSignupPanels.gameObject.SetActive(true);
            }

            if (m_InfoPanel == null)
            {
                m_InfoPanel = FindObjectOfType <InfoPanel>();
            }
            if (m_MainMenuPanel == null)
            {
                m_MainMenuPanel = FindObjectOfType <MainMenuPanel>();
            }
            if (m_FadePanel == null)
            {
                m_FadePanel = FindObjectOfType <FadePanel>();
            }
            if (m_LevelPanel == null)
            {
                m_LevelPanel = FindObjectOfType <LevelPanel>();
            }
            if (m_ShopCanvas == null)
            {
                m_ShopCanvas = FindObjectOfType <ShopCanvas>();
            }
            if (m_BoostLoading == null)
            {
                m_BoostLoading = FindObjectOfType <BoostLoading>();
            }
            if (m_ScorePanel == null)
            {
                m_ScorePanel = FindObjectOfType <ScoreMenuPanel>();
            }
        }
예제 #14
0
파일: Main.cs 프로젝트: Jorch72/CS-Treefrog
        private void ContentWorkspaceContentOpened(object sender, ContentPresenterEventArgs e)
        {
            TabPage page = new TabPage(e.Content.Name)
            {
                Tag = e.Content.Uid
            };

            tabControlEx1.TabPages.Add(page);

            LevelPanel lpanel = new LevelPanel();

            lpanel.BindController(e.Content as LevelPresenter);
            lpanel.Dock = DockStyle.Fill;

            page.Controls.Add(lpanel);
        }
예제 #15
0
    void SetLevelsPanel(PlayerInfo playerInfo)
    {
        Vector3 position = new Vector3(0f, basePanelPosition, 0f);

        foreach (LevelInfo levelInfo in playerInfo.LevelList)
        {
            GameObject newObj        = Instantiate(levelPanelPrefab, position, Quaternion.identity);
            LevelPanel newLevelPanel = newObj.GetComponent <LevelPanel>();
            newLevelPanel.levelInfo = levelInfo;
            newLevelPanel.SetDisplay();

            newObj.transform.SetParent(scrollRectObject.transform);
            newObj.transform.localPosition = position;
            position.y -= panelDistance;
            levelPanelList.Add(newObj);
        }
    }
예제 #16
0
파일: Main.cs 프로젝트: Jorch72/CS-Treefrog
        private void ContentWorkspaceReset(object sender, EventArgs e)
        {
            tabControlEx1.TabPages.Clear();

            foreach (LevelPresenter lp in _editor.ContentWorkspace.OpenContents)
            {
                TabPage page = new TabPage(lp.Level.Name)
                {
                    Tag = lp.Level.Uid
                };
                tabControlEx1.TabPages.Add(page);

                LevelPanel lpanel = new LevelPanel();
                lpanel.BindController(lp);
                lpanel.Dock = DockStyle.Fill;

                page.Controls.Add(lpanel);
            }
        }
예제 #17
0
        public LevelPanel OpenLevelEditor(LevelInfo levelInfo)
        {
            var existingTab = OpenedTabs.Where(t => t.DataContext == levelInfo).FirstOrDefault();

            if (existingTab != null)
            {
                TabsOpen.SelectedItem = SelectedTabItem = existingTab;
                return((LevelPanel)existingTab.Content);
            }

            TabItem    tabItem    = new TabItem();
            LevelPanel levelPanel = new LevelPanel(_graphicsService, _palettesService, _textService, _tileService, _gameObjectService, _levelService, _clipBoardService, levelInfo);

            tabItem.Header      = levelInfo.Name;
            tabItem.Content     = levelPanel;
            tabItem.DataContext = levelInfo;

            TabsOpen.Items.Add(tabItem);
            OpenedTabs.Add(tabItem);
            TabsOpen.Visibility   = Visibility.Visible;
            TabsOpen.SelectedItem = SelectedTabItem = tabItem;
            return(levelPanel);
        }
예제 #18
0
파일: Main.cs 프로젝트: Elof3/Treefrog
        private void ContentWorkspaceReset(object sender, EventArgs e)
        {
            tabControlEx1.TabPages.Clear();

            foreach (LevelPresenter lp in _editor.ContentWorkspace.OpenContents) {
                TabPage page = new TabPage(lp.Level.Name) {
                    Tag = lp.Level.Uid
                };
                tabControlEx1.TabPages.Add(page);

                LevelPanel lpanel = new LevelPanel();
                lpanel.BindController(lp);
                lpanel.Dock = DockStyle.Fill;

                page.Controls.Add(lpanel);
            }
        }
예제 #19
0
파일: Main.cs 프로젝트: Elof3/Treefrog
        private void ContentWorkspaceContentOpened(object sender, ContentPresenterEventArgs e)
        {
            TabPage page = new TabPage(e.Content.Name) {
                Tag = e.Content.Uid
            };
            tabControlEx1.TabPages.Add(page);

            LevelPanel lpanel = new LevelPanel();
            lpanel.BindController(e.Content as LevelPresenter);
            lpanel.Dock = DockStyle.Fill;

            page.Controls.Add(lpanel);
        }
예제 #20
0
 private void LevelPanel_LevelEditorExitSelected(int x, int y)
 {
     _levelPanel.LevelEditorExitSelected -= LevelPanel_LevelEditorExitSelected;
     _levelPanel = null;
 }
예제 #21
0
파일: MapField.cs 프로젝트: GotoK/H401
 public static void SetPanel(LevelPanel panel)
 {
     levelPanel = panel;
 }
예제 #22
0
 private void Awake()
 {
     levelManager = FindObjectOfType <LevelManager>();
     levelPanel   = FindObjectOfType <LevelPanel>();
 }
예제 #23
0
 void Start()
 {
     numberOfCoins.text = PlayerPrefs.GetInt("Coins", 0).ToString();
     score.text         = PlayerPrefs.GetInt("Score", 0).ToString();
     LP = LevelPanel.instance;
 }