本文整理汇总了C#中Effect.SetZooming方法的典型用法代码示例。如果您正苦于以下问题:C# Effect.SetZooming方法的具体用法?C# Effect.SetZooming怎么用?C# Effect.SetZooming使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Effect
的用法示例。
在下文中一共展示了Effect.SetZooming方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public override void Setup(Game _game, UserInput _keyboard, ScreenMessage _message)
{
base.Setup(_game, _keyboard, _message);
deathTimer = 0;
startTimer = 0;
winTimer = 0;
if (_message.Level != null) {
m_tilemap = _message.Level;
} else {
m_tilemap = new TileMap(levelFile);
}
m_size = new Vector2i(m_tilemap.Width, m_tilemap.Height);
Bounds.Right = m_size.X;
Bounds.Top = m_size.Y;
m_house = new ObjectHouse(m_tilemap);
StarryBackground bg = new StarryBackground(m_tilemap.Size);
m_house.AddDrawable(bg);
gangsterNo1 = new Hero(m_keyboard, m_house);
gangsterNo1.Position = new Vector2f(1f, 10f);
gangsterNo1.PlaceInWorld(m_tilemap);
m_house.AddDrawable(gangsterNo1);
m_house.AddUpdateable(gangsterNo1);
m_house.Add<IShootable>(gangsterNo1);
m_game.SetCameraSubject(gangsterNo1);
m_tilemap.Create(m_house, _game);
m_house.AddDrawable(m_tilemap);
// Text score = new Text("Left: 00");
// score.updateAction = (_d) => {
// score.Contents = "Left: " + m_house.GetAllDrawable<Target>().Count().ToString("00");
// };
// score.SetHUD(_game.Camera);
// score.TopRight();
//
// m_house.AddUpdateable(score);
// m_house.AddDrawable(score);
//
// Score score_pic = new Score(gangsterNo1);
// score_pic.SetHUD(_game.Camera);
// score_pic.TopLeft();
//
// m_house.AddUpdateable(score_pic);
// m_house.AddDrawable(score_pic);
//
//
// pixelly_fx_buffer
// = new ScreenSprite(
// new Vector2i(Game.SmallScreenWidth, Game.SmallScreenHeight),
// new Vector2i(Game.ScreenWidth, Game.ScreenHeight),
// new Vector2i(Game.Width, Game.Height)) {
// CaptureLayer = Layer.Pixelly,
// Layer = Layer.Normal,
// Scaling = Sprite.ScaleType.Pixelly,
// Feedback = 0.9f,
// Priority = Priority.Front
// };
// pixelly_fx_buffer.updateAction = () => {
// pixelly_fx_buffer.Position = -_game.Camera.LastOffset;
// };
//
// m_house.AddDrawable(pixelly_fx_buffer);
// m_house.AddUpdateable(pixelly_fx_buffer);
// m_house.Add<IGrabing>(pixelly_fx_buffer);
//
// blurry_fx_buffer
// = new ScreenSprite(
// new Vector2i(Game.SmallScreenWidth/2, Game.SmallScreenHeight/2),
// new Vector2i(Game.ScreenWidth, Game.ScreenHeight),
// new Vector2i(Game.Width, Game.Height)) {
// CaptureLayer = Layer.Blurry,
// Layer = Layer.Normal,
// Scaling = Sprite.ScaleType.Blurry,
// Feedback = 0.9f,
// Priority = Priority.Back
// };
// blurry_fx_buffer.SetHUD(_game.Camera);
//
// m_house.AddDrawable(blurry_fx_buffer);
// m_house.AddUpdateable(blurry_fx_buffer);
// m_house.Add<IGrabing>(blurry_fx_buffer);
//
death_fx_buffer
= new Effect(
new Vector2i(Game.SmallScreenWidth/2, Game.SmallScreenHeight/2),
new Vector2i(Game.ScreenWidth, Game.ScreenHeight),
new Vector2i(Game.Width, Game.Height)) {
CaptureLayer = Layer.Normal,
Layer = Layer.FX,
Feedback = 1f,
Priority = Priority.Front
};
death_fx_buffer.SetHUD(_game.Camera);
death_fx_buffer.SetSpinning(15);
death_fx_buffer.SetZooming(-0.2f);
//.........这里部分代码省略.........