예제 #1
0
    private void RaycastPortal()
    {
        RaycastHit hit = CameraManager.GetCameraRaycast(player.GetStats().InteractRange);

        if (hit.transform)
        {
            if (Input.GetButtonDown("Interact"))
            {
                if (hit.transform.CompareTag("Interactable"))
                {
                    if (hit.transform.GetComponent <PortalPanel>())
                    {
                        PortalPanel panel = hit.transform.GetComponent <PortalPanel>();
                        panel.OnActive();
                    }
                }
            }
        }
    }
예제 #2
0
파일: HaEditor.cs 프로젝트: Aeopp/Github
        private void HaEditor_Load(object sender, EventArgs e)
        {
            // This has to be here and not in .ctor for some reason, otherwise subwindows are not locating properly
            tilePanel = new TilePanel(hcsm)
            {
                Enabled = false
            };
            objPanel = new ObjPanel(hcsm)
            {
                Enabled = false
            };
            lifePanel = new LifePanel(hcsm)
            {
                Enabled = false
            };
            portalPanel = new PortalPanel(hcsm)
            {
                Enabled = false
            };
            bgPanel = new BackgroundPanel(hcsm)
            {
                Enabled = false
            };
            commonPanel = new CommonPanel(hcsm)
            {
                Enabled = false
            };

            List <DockContent> dockContents = new List <DockContent> {
                tilePanel, objPanel, lifePanel, portalPanel, bgPanel, commonPanel
            };

            dockContents.ForEach(x => x.Show(dockPanel));
            dockContents.ForEach(x => x.DockState = DockState.DockRight);
            dockContents.ForEach(x => x.DockAreas = DockAreas.DockRight);
            commonPanel.Pane = bgPanel.Pane = portalPanel.Pane = lifePanel.Pane = objPanel.Pane = tilePanel.Pane;

            if (!hcsm.backupMan.AttemptRestore())
            {
                hcsm.LoadMap(new Load(multiBoard, tabs, hcsm.MakeRightClickHandler()));
            }
        }