本文整理汇总了C#中Room.RemovePuzzle方法的典型用法代码示例。如果您正苦于以下问题:C# Room.RemovePuzzle方法的具体用法?C# Room.RemovePuzzle怎么用?C# Room.RemovePuzzle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Room
的用法示例。
在下文中一共展示了Room.RemovePuzzle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Throw
public static void Throw(Room room, int x, int y, Vector2 velocity)
{
if (((Boulder)room.tiles[x, y].puzzle).bottom)
{
y--;
}
if (((Boulder)room.tiles[x, y].puzzle).right)
{
x--;
}
room.RemovePuzzle(x, y);
room.RemovePuzzle(x + 1, y);
room.RemovePuzzle(x, y + 1);
room.RemovePuzzle(x + 1, y + 1);
room.bullets.Add(new ThrownBoulder(Room.TileToWorldPos(x + 1, y + 1), velocity));
}
示例2: OnPlayerCollide
public override void OnPlayerCollide(Room room, int x, int y, Player player)
{
Vector2 pos = Tile.tileSize * new Vector2(x + 0.5f, y + 0.5f);
if (Math.Abs(player.position.X - pos.X) <= (Player.size + width) / 2f &&
Math.Abs(player.position.Y - pos.Y) <= (Player.size + height) / 2f)
{
player.silverKeys++;
room.RemovePuzzle(x, y);
}
}
示例3: Win
private void Win(Enemy enemy, Room room, Player player)
{
room.bullets.Clear();
for (int x = 0; x < room.width; x++)
{
for (int y = 0; y < room.height; y++)
{
room.RemovePuzzle(x, y);
}
}
player.exp++;
room.AddPuzzle(room.width / 2, room.height / 2, new Goal("Fire Dungeon", Color.Brown));
}