コード例 #1
0
    void titleScene()
    {
        string selection = ContentsManager.getSelection().name;

        if (string.Equals(selection, "play") && GamePad.GetButtonDown(GamePad.Button.A, GamePad.Index.One))
        {
            SceneManager.LoadScene(connectSceneName);
        }
        else if (string.Equals(selection, "quit") && GamePad.GetButtonDown(GamePad.Button.A, GamePad.Index.One))
        {
            Application.Quit();
        }
    }
コード例 #2
0
 protected void LoadTextures()
 {
     _icon64 = ContentsManager.GetTexture("screenshots_icon_64x64.png");
     //_icon128 = ContentsManager.GetTexture("screenshots_icon_128x128.png");
     _inspectIcon = ContentsManager.GetTexture("inspect.png");
     //_portaitModeIcon128 = ContentsManager.GetTexture("portaitMode_icon_128x128.png");
     //_portaitModeIcon512 = ContentsManager.GetTexture("portaitMode_icon_128x128.png");
     _trashcanClosedIcon64 = ContentsManager.GetTexture("trashcanClosed_icon_64x64.png");
     _trashcanOpenIcon64   = ContentsManager.GetTexture("trashcanOpen_icon_64x64.png");
     //_trashcanClosedIcon128 = ContentsManager.GetTexture("trashcanClosed_icon_128x128.png");
     //_trashcanOpenIcon128 = ContentsManager.GetTexture("trashcanOpen_icon_128x128.png");
     _incompleteHeartIcon          = ContentsManager.GetTexture("incomplete_heart.png");
     _completeHeartIcon            = ContentsManager.GetTexture("complete_heart.png");
     _deleteSearchBoxContentIcon   = ContentsManager.GetTexture("784262.png");
     _notificationBackroundTexture = ContentsManager.GetTexture("ns-button.png");
 }
コード例 #3
0
ファイル: Layer2D.cs プロジェクト: Pctg-x8/Altseed
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public Layer2D()
        {
            coreLayer2D = Engine.ObjectSystemFactory.CreateLayer2D();

            var p = coreLayer2D.GetPtr();
            if(GC.Layer2Ds.GetObject(p) != null)
            {
                Particular.Helper.ThrowException("");
            }

            GC.Layer2Ds.AddObject(p, this);

            contentsManager = new ContentsManager<Object2D>();
            componentManager = new ComponentManager<Layer2D, Layer2DComponent>(this);

            commonObject = coreLayer2D;
        }
コード例 #4
0
 protected override void Initialize()
 {
     ICON     = ICON ?? ContentsManager.GetTexture("musician_icon.png");
     Conveyor = new Conveyor()
     {
         Parent = ContentService.Graphics.SpriteScreen, Visible = false
     };
     xmlParser       = new XmlMusicSheetReader();
     displayedSheets = new List <SheetButton>();
     StopButton      = new HealthPoolButton()
     {
         Parent  = GameService.Graphics.SpriteScreen,
         Text    = "Stop Playback",
         ZIndex  = -1,
         Visible = false
     };
     StopButton.LeftMouseButtonReleased += delegate
     {
         this.StopPlayback();
     };
     GameService.GameIntegration.Gw2LostFocus += GameIntegrationOnGw2LostFocus;
 }
コード例 #5
0
ファイル: Layer3D.cs プロジェクト: Pctg-x8/Altseed
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public Layer3D(RenderSettings settings = null)
        {
            swig.RenderSettings settings_ = new swig.RenderSettings();
            if(settings != null)
            {
                settings_.IsLightweightMode = settings.IsLightweightMode;
                settings_.VisualizedBuffer = (swig.VisualizedBufferType)settings.VisualizedBuffer;
            }

            coreLayer3D = Engine.ObjectSystemFactory.CreateLayer3D(settings_);

            var p = coreLayer3D.GetPtr();
            if (GC.Layer3Ds.GetObject(p) != null)
            {
                Particular.Helper.ThrowException("");
            }

            GC.Layer3Ds.AddObject(p, this);

            contentsManager = new ContentsManager<Object3D>();

            commonObject = coreLayer3D;
        }
コード例 #6
0
 protected override void Initialize()
 {
     LoadTextures();
     GameService.Overlay.UserLocaleChanged += ChangeLocalization;
     ChangeLocalization(null, null);
     printScreenKey            = new KeyBinding(Keys.PrintScreen);
     printScreenKey.Activated += ScreenshotNotify;
     printScreenKey.Enabled    = true;
     screensPathWatchers       = new List <FileSystemWatcher>();
     displayedThumbnails       = new Dictionary <string, Panel>();
     foreach (var f in _imageFilters)
     {
         var w = new FileSystemWatcher
         {
             Path                = DirectoryUtil.ScreensPath,
             NotifyFilter        = NotifyFilters.LastWrite | NotifyFilters.FileName,
             Filter              = f,
             EnableRaisingEvents = true
         };
         w.Created += OnScreenshotCreated;
         w.Deleted += OnScreenshotDeleted;
         w.Renamed += OnScreenshotRenamed;
         screensPathWatchers.Add(w);
     }
     moduleCornerIcon = new CornerIcon
     {
         IconName = Name,
         Icon     = ContentsManager.GetTexture("screenshots_icon_64x64.png"),
         Priority = Name.GetHashCode()
     };
     moduleCornerIcon.Click += delegate
     {
         GameService.Overlay.BlishHudWindow.Show();
         GameService.Overlay.BlishHudWindow.Navigate(modulePanel);
         //TODO: Select the correct tab.
     };
 }
コード例 #7
0
ファイル: LxnaService.cs プロジェクト: lulzzz/lxna
 public LxnaService(LxnaOptions options)
 {
     _options         = options;
     _contentsManager = new ContentsManager(_options);
 }
コード例 #8
0
 public SpawnBase(MeshFilter spawnableMesh)
 {
     contentsManager    = UGL.contentsManager;
     this.spawnableMesh = spawnableMesh;
 }
コード例 #9
0
        private Panel BuildLibraryPanel(WindowBase wndw)
        {
            var lPanel = new Panel()
            {
                CanScroll = false,
                Size      = wndw.ContentRegion.Size
            };
            var backButton = new BackButton(wndw)
            {
                Text     = "Musician",
                NavTitle = "Library",
                Parent   = lPanel,
                Location = new Point(20, 20),
            };
            var melodyPanel = new Panel()
            {
                Location   = new Point(0, MusicianModule.BOTTOM_MARGIN + backButton.Bottom),
                Size       = new Point(lPanel.Width, lPanel.Size.Y - 50 - MusicianModule.BOTTOM_MARGIN),
                Parent     = lPanel,
                ShowTint   = true,
                ShowBorder = true,
                CanScroll  = true
            };

            // TODO: Load a list from online database.
            foreach (RawMusicSheet sheet in Sheets)
            {
                var melody = new SheetButton
                {
                    Parent     = melodyPanel,
                    Icon       = ContentsManager.GetTexture(@"instruments\" + sheet.Instrument.ToLowerInvariant() + ".png"),
                    IconSize   = DetailsIconSize.Small,
                    Artist     = sheet.Artist,
                    Title      = sheet.Title,
                    User       = sheet.User,
                    MusicSheet = sheet
                };
                displayedSheets.Add(melody);
                melody.LeftMouseButtonPressed += delegate
                {
                    if (melody.MouseOverPlay)
                    {
                        this.StopPlayback();
                        GameService.Overlay.BlishHudWindow.Hide();
                        MusicPlayer = MusicPlayerFactory.Create(
                            melody.MusicSheet,
                            InstrumentMode.Preview
                            );
                        MusicPlayer.Worker.Start();
                        Conveyor.Visible   = true;
                        StopButton.Visible = true;
                    }
                    if (melody.MouseOverEmulate)
                    {
                        this.StopPlayback();
                        GameService.Overlay.BlishHudWindow.Hide();
                        MusicPlayer = MusicPlayerFactory.Create(
                            melody.MusicSheet,
                            InstrumentMode.Emulate
                            );
                        MusicPlayer.Worker.Start();
                        StopButton.Visible = true;
                    }
                    if (melody.MouseOverPreview)
                    {
                        if (melody.IsPreviewing)
                        {
                            this.StopPlayback();
                        }
                        else
                        {
                            this.StopPlayback();
                            melody.IsPreviewing = true;
                            MusicPlayer         = MusicPlayerFactory.Create(
                                melody.MusicSheet,
                                InstrumentMode.Preview
                                );
                            MusicPlayer.Worker.Start();
                        }
                    }
                };
            }
            var ddSortMethod = new Dropdown()
            {
                Parent   = lPanel,
                Visible  = melodyPanel.Visible,
                Location = new Point(lPanel.Right - 150 - 10, 5),
                Width    = 150
            };

            ddSortMethod.Items.Add(DD_TITLE);
            ddSortMethod.Items.Add(DD_ARTIST);
            ddSortMethod.Items.Add(DD_USER);
            ddSortMethod.Items.Add("------------------");
            ddSortMethod.Items.Add(DD_HARP);
            ddSortMethod.Items.Add(DD_FLUTE);
            ddSortMethod.Items.Add(DD_LUTE);
            ddSortMethod.Items.Add(DD_HORN);
            ddSortMethod.Items.Add(DD_BASS);
            ddSortMethod.Items.Add(DD_BELL);
            ddSortMethod.Items.Add(DD_BELL2);
            ddSortMethod.ValueChanged += UpdateSort;
            ddSortMethod.SelectedItem  = DD_TITLE;

            UpdateSort(ddSortMethod, EventArgs.Empty);
            backButton.LeftMouseButtonReleased += (object sender, MouseEventArgs e) => { wndw.NavigateHome(); };

            return(lPanel);
        }