当前位置: 首页>>代码示例>>C#>>正文


C# Image.ActivateEffect方法代码示例

本文整理汇总了C#中System.Image.ActivateEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Image.ActivateEffect方法的具体用法?C# Image.ActivateEffect怎么用?C# Image.ActivateEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Image的用法示例。


在下文中一共展示了Image.ActivateEffect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadContent

        public override void LoadContent()
        {
            base.LoadContent();

            Image = new Image();
            Image.Path = "Gameplay/UI/loadingscreenanimation";
            //Image.SourceRect = new Rectangle(0, 0, 400, 100);
            //Image.Position = new Vector2 ((ScreenManager.Instance.GraphicsDevice.Viewport.Width / 2) - 100,
            //	(ScreenManager.Instance.GraphicsDevice.Viewport.Height / 2) - 100);
            Image.LoadContent();

            Image.SourceRect = new Rectangle(0, 0, 100, 100);
            //Image.Position = new Vector2 ((ScreenManager.Instance.GraphicsDevice.Viewport.Width / 2) - 100,
            //	(ScreenManager.Instance.GraphicsDevice.Viewport.Height / 2) - 100);

            Image.IsActive = true;
            Image.ActivateEffect ("SpriteSheetEffect");
            Image.SpriteSheetEffect.IsActive = true;
            /* Turn the fade effect off */
            Image.FadeEffect.IsActive = false;
            /* Make the player face the camera */
            Image.SpriteSheetEffect.SwitchFrame = 250;
            Image.SpriteSheetEffect.AmountOfFrames = new Vector2(4, 1);
            Image.SpriteSheetEffect.DefaultFrame = Vector2.Zero;
            Image.SpriteSheetEffect.CurrentFrame = Image.SpriteSheetEffect.DefaultFrame;

            Image.Position = new Vector2 (Image.Position.X - 50, Image.Position.Y - 50);
        }
开发者ID:nkruger311,项目名称:SongAdventureAndroid,代码行数:28,代码来源:LoadingScreen.cs

示例2: LoadContent

        public override void LoadContent()
        {
            loadingImage = new Image();
            loadingImage.Path = "Gameplay/UI/loadingscreenanimation";
            //Image.SourceRect = new Rectangle(0, 0, 400, 100);
            //Image.Position = new Vector2 ((ScreenManager.Instance.GraphicsDevice.Viewport.Width / 2) - 100,
            //	(ScreenManager.Instance.GraphicsDevice.Viewport.Height / 2) - 100);
            loadingImage.LoadContent();

            loadingImage.SourceRect = new Rectangle(0, 0, 100, 100);
            //Image.Position = new Vector2 ((ScreenManager.Instance.GraphicsDevice.Viewport.Width / 2) - 100,
            //	(ScreenManager.Instance.GraphicsDevice.Viewport.Height / 2) - 100);

            loadingImage.IsActive = true;
            loadingImage.ActivateEffect ("SpriteSheetEffect");
            loadingImage.SpriteSheetEffect.IsActive = true;

            loadingImage.FadeEffect.IsActive = false;

            loadingImage.SpriteSheetEffect.SwitchFrame = 250;
            loadingImage.SpriteSheetEffect.AmountOfFrames = new Vector2(4, 1);
            loadingImage.SpriteSheetEffect.DefaultFrame = Vector2.Zero;
            loadingImage.SpriteSheetEffect.CurrentFrame = loadingImage.SpriteSheetEffect.DefaultFrame;

            loadingImage.Position = new Vector2 (loadingImage.Position.X - 50, loadingImage.Position.Y - 50);

            IsInitializing = true;

            base.LoadContent();

            InputManager.Instance.ResetInputState();

            Camera2D.Instance.PlayerPosition = Camera2D.Instance.ScreenCenter;
            Camera2D.Instance.Position = Camera2D.Instance.ScreenCenter;

            LoadBackground();
            LoadSongism();
            LoadButtons();

            //_guessingItem = new SongismGuessingItem("All Mixed Up");
            //_guessingItem.Position = new Vector2(16, 16);
            //_guessingItem.LoadContent();

            _fDiscovered = currentSongism.Discovered;
            if (_fDiscovered) {
                _oSongInfoList = new SongismSongInfoListBox (currentSongism.SongInfo);
                _oSongInfoList.LoadContent ();
            } else {

                _guessingList = new SongismGuessingListBox();
                _guessingList.LoadContent();
            }

            IsInitializing = false;
        }
开发者ID:nkruger311,项目名称:SongAdventureAndroid,代码行数:55,代码来源:SongismScreen.cs


注:本文中的System.Image.ActivateEffect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。