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


C# Puzzle.Set方法代码示例

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


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

示例1: OnPrepare

	public override void OnPrepare(Puzzle puzzle)
	{
		var lockedPlace = puzzle.NewPlace("LockedPlace");

		lockedPlace.DeclareLockSelf();
		lockedPlace.ReservePlace();

		puzzle.Set("open", "Switch" + Random(1, 5));
		puzzle.Set("activated", false);
	}
开发者ID:tkiapril,项目名称:aura,代码行数:10,代码来源:switchdoor_switchmonster.cs

示例2: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var chest = prop as LockedChest;
		if (chest == null || puzzle.Get(chest.Name + "Open") || !chest.IsOpen)
			return;

		puzzle.Set(chest.Name + "Open", true);

		if (puzzle.Get(chest.Name + "Monster"))
		{
			var place = puzzle.GetPlace("Place");
			place.CloseAllDoors();
			place.SpawnSingleMob(chest.Name + "Mob", "Mob" + puzzle.Get("MonsterI"));
			puzzle.Set("MonsterI", puzzle.Get("MonsterI") + 1);
		}
	}
开发者ID:xKamuna,项目名称:aura,代码行数:16,代码来源:keychest_9chest.cs

示例3: OnPrepare

	public override void OnPrepare(Puzzle puzzle)
	{
		var place = puzzle.NewPlace("Place");
		place.ReservePlace();
		place.ReserveDoors();

		puzzle.Set("MonsterI", 1);
	}
开发者ID:xKamuna,项目名称:aura,代码行数:8,代码来源:keychest_9chest.cs

示例4: OnPuzzleCreate

	public override void OnPuzzleCreate(Puzzle puzzle)
	{
		var place = puzzle.GetPlace("Place");
		var monsterChests = UniqueRnd(3, 1, 2, 3, 4, 5, 6, 7, 8, 9);

		for (int i = 1; i <= 9; ++i)
		{
			var monsterChest = monsterChests.Contains(i);

			var chest = new LockedChest(puzzle, "Chest" + i, "lock1");
			AddChestDrops(chest, i, monsterChest);
			place.AddProp(chest, Placement.Center9);

			puzzle.Set("Chest" + i + "Open", false);
			puzzle.Set("Chest" + i + "Monster", monsterChest);
		}
	}
开发者ID:xKamuna,项目名称:aura,代码行数:17,代码来源:keychest_9chest.cs

示例5: OnPrepare

	public override void OnPrepare(Puzzle puzzle)
	{
		var lockedPlace = puzzle.NewPlace("LockedPlace");
		var chestPlace = puzzle.NewPlace("ChestPlace");

		lockedPlace.DeclareLock();
		chestPlace.DeclareUnlock(lockedPlace);
		chestPlace.ReservePlace();
		chestPlace.ReserveDoors();

		puzzle.Set("ChestOpen", false);
	}
开发者ID:tkiapril,项目名称:aura,代码行数:12,代码来源:keychest_monster.cs

示例6: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var chest = prop as Chest;
		if (chest != null && chest.Name == "KeyChest" && !puzzle.Get("ChestOpen"))
		{
			puzzle.Set("ChestOpen", true);

			var chestPlace = puzzle.GetPlace("ChestPlace");
			chestPlace.CloseAllDoors();
			chestPlace.SpawnSingleMob("SingleMob1");
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:12,代码来源:entrance_puzzle.cs

示例7: OnPuzzleCreate

	public override void OnPuzzleCreate(Puzzle puzzle)
	{
		var place = puzzle.GetPlace("Place");

		// Get 4 random numbers between 1 and 9
		var specialChests = UniqueRnd(4, 1, 2, 3, 4, 5, 6, 7, 8, 9);

		// Spawn 9 chests, with monsters in 3, and an enchant in one of them
		for (int i = 1; i <= 9; ++i)
		{
			// First 3 special chests are monsters, last is enchant
			var isMonsterChest = specialChests.Take(3).Contains(i);
			var isEnchantChest = specialChests[3] == i;

			var chest = new LockedChest(puzzle, "Chest" + i, "lock1");
			AddChestDrops(chest, i, isMonsterChest, isEnchantChest);
			place.AddProp(chest, Placement.Center9);

			puzzle.Set("Chest" + i + "Open", false);
			puzzle.Set("Chest" + i + "Monster", isMonsterChest);
		}
	}
开发者ID:Vinna,项目名称:aura,代码行数:22,代码来源:keychest_9chest.cs

示例8: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var Switch = prop as Switch;
		if (Switch == null)
			return;

		if (puzzle.Get("activated"))
			return;

		var lockedPlace = puzzle.GetPlace("LockedPlace");
		lockedPlace.Open();

		puzzle.Set("activated", true);
	}
开发者ID:aura-project,项目名称:aura,代码行数:14,代码来源:rp_giantspider2.cs

示例9: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var Switch = prop as Switch;
		if (Switch == null)
			return;

		if (puzzle.Get("activated"))
			return;

		if (Switch.State == "on" && !puzzle.Get(Switch.Name + "Activated"))
		{
			puzzle.Set(Switch.Name + "Activated", true);

			var lockedPlace = puzzle.GetPlace("LockedPlace");

			if (Switch.Name == puzzle.Get("open"))
			{
				lockedPlace.Open();
				puzzle.Set("activated", true);
			}
			else
				lockedPlace.SpawnSingleMob(Switch.Name + "Mob", "Mob1");
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:24,代码来源:switchdoor_switchmonster.cs

示例10: OnPuzzleCreate

	public override void OnPuzzleCreate(Puzzle puzzle)
	{
		var lockedPlace = puzzle.GetPlace("LockedPlace");

		for (int i = 1; i <= 4; ++i)
		{
			var zwitch = new Switch("Switch" + i, lockedPlace.LockColor);
			if (ChannelServer.Instance.Conf.World.EasySwitch && puzzle.Get("open") == "Switch" + i)
				zwitch.Info.Color2 = 0xFFFFFF;

			lockedPlace.AddProp(zwitch, Placement.Corner4);
			puzzle.Set("Switch" + i + "Activated", false);
		}

		puzzle.LockPlace(lockedPlace);
	}
开发者ID:tkiapril,项目名称:aura,代码行数:16,代码来源:switchdoor_switchmonster.cs

示例11: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var chest = prop as Chest;
		if (chest != null)
		{
			if (chest.Name == "KeyChest" && !puzzle.Get("ChestOpen"))
			{
				puzzle.Set("ChestOpen", true);

				var chestPlace = puzzle.GetPlace("ChestPlace");
				chestPlace.CloseAllDoors();

				if (Random() < 50)
					chestPlace.SpawnSingleMob("LastMob");
				else
					chestPlace.SpawnSingleMob("ChainMob1", "Mob1");
			}
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:19,代码来源:keychest_monster.cs


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