本文整理汇总了C#中TileMap.bulletPosition方法的典型用法代码示例。如果您正苦于以下问题:C# TileMap.bulletPosition方法的具体用法?C# TileMap.bulletPosition怎么用?C# TileMap.bulletPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileMap
的用法示例。
在下文中一共展示了TileMap.bulletPosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
protected override void LoadContent()
{
#region music
if (musicValue == 0)
{
backgroundMusic = Content.Load<Song>("Music/DS Main");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
if (musicValue == 4)
{
backgroundMusic = Content.Load<Song>("Music/Throne Room");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
if (musicValue == 2)
{
backgroundMusic = Content.Load<Song>("Music/Armory");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
if (musicValue == 5)
{
backgroundMusic = Content.Load<Song>("Music/Opening");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
if (musicValue == 3)
{
backgroundMusic = Content.Load<Song>("Music/Cell Block");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
if (musicValue == 1)
{
backgroundMusic = Content.Load<Song>("Music/Deep Space - 1st World");
MediaPlayer.Play(backgroundMusic);
MediaPlayer.IsRepeating = true;
}
#endregion
if (transitionValue == 0 || transitionValue == 1 || transitionValue == 2 || transitionValue == 3 || transitionValue == 4 || transitionValue == 5)
{
fadedelay = 10;
alpha = 1;
timer = 0;
openingspace = false;
switchcounter = 0;
bosspoop = 750;
bossSpeed = 0;
bossAttack = 1250;
font = Content.Load<SpriteFont>("Fonts/CreditText");
}
#region loadvalue
if (loadValue == 0)
{
gameStart = new Save_Load();
gameStart.Load();
levelprogress = gameStart.LoadProgress;
dude = new Sprite(Content.Load<Texture2D>("Sprites/TheDude"), new Vector2(700, 500), new Vector2(50, 75), ScreenWidth, ScreenHeight, 0, 1, 0);
wrench[0] = new Sprite(Content.Load<Texture2D>("Sprites/Thewrench"), new Vector2((dude.position.X + (dude.size.X / 2)), (dude.position.Y + (dude.size.Y / 2))), new Vector2(25, 25), ScreenWidth, ScreenHeight, 0, 2, 0);
}
if (loadValue == 1)
{
border = new TileMap(Content.Load<Texture2D>("Tilemap/shipblock"), Content.Load<Texture2D>("Menu/levelbox"), Content.Load<Texture2D>("Tilemap/electricityleftrightA"), Content.Load<Texture2D>("Tilemap/electicityupdownA"), Content.Load<Texture2D>("Tilemap/Door"), Content.Load<Texture2D>("Switches/ElectricSwitch"), Content.Load<Texture2D>("Switches/TurretSwitch"), Content.Load<Texture2D>("Switches/DoorSwitch"));
border.loadpts(lvl);
border.bulletPosition();
dude = new Sprite(Content.Load<Texture2D>("Sprites/TheDude"), new Vector2(border.start.X, border.start.Y), new Vector2(50, 75), ScreenWidth, ScreenHeight, (int)border.start.Z, 1, 0);
font = Content.Load<SpriteFont>("Fonts/GameText");
for (i = 0; i <= 998; i++)
wrench[i] = new Sprite(Content.Load<Texture2D>("Sprites/Thewrench"), new Vector2((dude.position.X + (dude.size.X / 2)), (dude.position.Y + (dude.size.Y / 2))), new Vector2(25, 25), ScreenWidth, ScreenHeight, 0, 2, 0);
for (int j = 0; j < border.counter; j++)
bullet[j] = new Sprite(Content.Load<Texture2D>("Sprites/bullet"), new Vector2(border.bulletP[j].X, border.bulletP[j].Y), new Vector2(10, 10), ScreenWidth, ScreenHeight, 0, 2, 0);
}
if (loadValue == 2)
{
dude = new Sprite(Content.Load<Texture2D>("Sprites/dude"), new Vector2(50, 500), new Vector2(50, 75), ScreenWidth, ScreenHeight, 2, 1, 0);
border = new TileMap(Content.Load<Texture2D>("Tilemap/shipblock"), Content.Load<Texture2D>("Menu/levelbox"), Content.Load<Texture2D>("Tilemap/electricityleftrightA"), Content.Load<Texture2D>("Tilemap/electicityupdownA"), Content.Load<Texture2D>("Tilemap/Door"), Content.Load<Texture2D>("Switches/ElectricSwitch"), Content.Load<Texture2D>("Switches/TurretSwitch"), Content.Load<Texture2D>("Switches/DoorSwitch"));
border.loadpts(0);
font = Content.Load<SpriteFont>("Fonts/LevelText");
}
if (loadValue == 3)
{
border = new TileMap(Content.Load<Texture2D>("Tilemap/shipblock"), Content.Load<Texture2D>("Menu/levelbox"), Content.Load<Texture2D>("Tilemap/electricityleftrightA"), Content.Load<Texture2D>("Tilemap/electicityupdownA"), Content.Load<Texture2D>("Tilemap/Door"), Content.Load<Texture2D>("Switches/ElectricSwitch"), Content.Load<Texture2D>("Switches/TurretSwitch"), Content.Load<Texture2D>("Switches/DoorSwitch"));
border.loadpts(lvl);
border.bulletPosition();
bossAttack = 0;
bossmanimage = 0;
switchcounter = 0;
bossSpeed = 1;
bosspoop = 5;
alpha = 1;
fadedelay = 100;
openingspace = false;
arm = false;
//.........这里部分代码省略.........