本文整理汇总了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);
}
示例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;
}