當前位置: 首頁>>代碼示例>>C#>>正文


C# Image.DeactivateEffect方法代碼示例

本文整理匯總了C#中System.Image.DeactivateEffect方法的典型用法代碼示例。如果您正苦於以下問題:C# Image.DeactivateEffect方法的具體用法?C# Image.DeactivateEffect怎麽用?C# Image.DeactivateEffect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Image的用法示例。


在下文中一共展示了Image.DeactivateEffect方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: LoadContent

        public void LoadContent()
        {
            IsInitializing = true;

            SongInfoImage = new Image();
            SongInfoImage.Text = _sSongInfoText;
            SongInfoImage.FontName = "Fonts/GameFont_Size32";

            SongInfoImage.LoadContent();
            SongInfoImage.DeactivateEffect("FadeEffect");
            SongInfoImage.DeactivateEffect("SpriteSheetEffect");
            SongInfoImage.Alpha = 1.0f;

            SongInfoImage.AddText(SongInfoImage.Text);
            //SongNameImage.AddTextThreadSafe(SongNameImage.Text);

            SongInfoImage.Position = Position;

            _songNameBoundingBox = new Rectangle((int)SongInfoImage.Position.X, (int)SongInfoImage.Position.Y, SongInfoImage.SourceRect.Width, SongInfoImage.SourceRect.Height);

            IsInitializing = false;
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:22,代碼來源:SongismSongInfoItem.cs

示例2: SongismGuessingItem

        public SongismGuessingItem(string songName)
        {
            Position = Vector2.Zero;
            Checked = false;

            RadioButton = new Image();
            RadioButton.Path = "Gameplay/UI/radiobuttonsheet";
            RadioButton.SourceRect = new Rectangle(0, 0, 36, 36);

            RadioButton.Effects = "SpriteSheetEffect";
            RadioButton.DeactivateEffect("FadeEffect");

            SongName = songName;
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:14,代碼來源:SongismGuessingItem.cs

示例3: LoadContent

        public void LoadContent()
        {
            Image = new Image();
            Image.Path = "Gameplay/UI/backpack";
            Image.LoadContent();

            Image.SourceRect = new Rectangle(0, 0, 64, 64);

            Image.IsActive = true;
            Image.DeactivateEffect ("SpriteSheetEffect");
            Image.SpriteSheetEffect.IsActive = false;

            Image.FadeEffect.IsActive = false;

            Image.TextAlignment = Globals.TextAlignment.Center;
            Image.TextColor = Color.White;

            Image.AddText(Inventory.Instance.SongBook.Count.ToString());
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:19,代碼來源:BackpackInventory.cs

示例4: LoadContent

        public void LoadContent()
        {
            Image = new Image();
            Image.Path = "Gameplay/UI/areaprogressicon";
            Image.FontName = "Fonts/GameFont_Size32";
            Image.LoadContent();

            Image.SourceRect = new Rectangle(0, 0, 100, 100);

            Image.IsActive = true;
            Image.DeactivateEffect ("SpriteSheetEffect");
            Image.SpriteSheetEffect.IsActive = false;

            Image.FadeEffect.IsActive = false;

            Image.TextAlignment = Globals.TextAlignment.Center;
            Image.TextColor = Color.White;

            Image.AddText(Inventory.Instance.SongBook.Count.ToString());
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:20,代碼來源:AreaProgressBar.cs

示例5: LoadSongism

        void LoadSongism()
        {
            XmlManager<Songism> currentSongismLoader = new XmlManager<Songism>();
            currentSongism = currentSongismLoader.Load(System.IO.Path.Combine(Globals.LoadGameplaySongismsDirectory, "CurrentSongism.xml"));

            CurrentSongismImage = new Image();
            CurrentSongismImage.Path = currentSongism.Image.Path;
            CurrentSongismImage.LoadContent();
            CurrentSongismImage.DeactivateEffect("FadeEffect");
            CurrentSongismImage.DeactivateEffect("SpriteSheetEffect");
            CurrentSongismImage.Alpha = 1.0f;
            CurrentSongismImage.Scale = new Vector2((512 / CurrentSongismImage.SourceRect.Width), (512 / CurrentSongismImage.SourceRect.Height));
            CurrentSongismImage.Position = new Vector2((ScreenManager.Instance.GraphicsDevice.Viewport.Width / 2) + (ScreenManager.Instance.GraphicsDevice.Viewport.Width / 4) - (ScreenManager.Instance.GraphicsDevice.Viewport.Width / 20), // - (ScreenManager.Instance.GraphicsDevice.Viewport.Width / 100),
                (ScreenManager.Instance.GraphicsDevice.Viewport.Height / 2) - (ScreenManager.Instance.GraphicsDevice.Viewport.Height / 10));

            _songismName = new Image();
            _songismName.FontName = "Fonts/GameFont_Size32";
            _songismName.TextAlignment = Globals.TextAlignment.Center;

            if (currentSongism.Discovered)
                _songismName.Text = currentSongism.Name;
            else
                _songismName.Text = "????";

            _songismName.LoadContent();
            _songismName.DeactivateEffect("FadeEffect");
            _songismName.DeactivateEffect("SpriteSheetEffect");
            _songismName.Alpha = 1.0f;

            if (currentSongism.Discovered)
                _songismName.AddText(currentSongism.Name);
            else
                _songismName.AddText("????");

            _songismName.Position = new Vector2(CurrentSongismImage.Position.X + (CurrentSongismImage.SourceRect.Width / 2) - (_songismName.SourceRect.Width / 2), 16);
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:36,代碼來源:SongismScreen.cs

示例6: LoadContent

        public void LoadContent()
        {
            IsInitializing = true;

            RadioButton = new Image();
            RadioButton.Path = "Gameplay/UI/radiobuttonsheet";
            RadioButton.SourceRect = new Rectangle(0, 0, 36, 36);

            RadioButton.Effects = "SpriteSheetEffect";

            RadioButton.LoadContent();
            RadioButton.DeactivateEffect("FadeEffect");
            RadioButton.Alpha = 1.0f;
            RadioButton.SpriteSheetEffect.AmountOfFrames = new Vector2(1, 2);
            RadioButton.SpriteSheetEffect.CurrentFrame = new Vector2(0, 0);
            RadioButton.Position = Position;
            RadioButton.UpdateSourceRectPosition ((int)RadioButton.Position.X, (int)RadioButton.Position.Y);

            font = ScreenManager.Instance.Content.Load<SpriteFont> ("Fonts/GameFont_Size32");

            _radioButtonBoundingBox = new Rectangle(RadioButton.SourceRect.X, RadioButton.SourceRect.Y, RadioButton.SourceRect.Width, RadioButton.SourceRect.Height);
            _songNameBoundingBox = new Rectangle((int)RadioButton.Position.X + RadioButton.SpriteSheetEffect.FrameWidth + 10, (int)Position.Y - 10, (int)font.MeasureString(SongName).X, (int)font.MeasureString(SongName).Y);

            Loaded = true;
            IsInitializing = false;
        }
開發者ID:nkruger311,項目名稱:SongAdventureAndroid,代碼行數:26,代碼來源:SongismGuessingItem.cs


注:本文中的System.Image.DeactivateEffect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。