本文整理汇总了C#中Puzzle.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Puzzle.Get方法的具体用法?C# Puzzle.Get怎么用?C# Puzzle.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Puzzle
的用法示例。
在下文中一共展示了Puzzle.Get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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");
}
}
示例3: 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);
}
示例4: 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");
}
}
示例5: 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);
}
示例6: 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");
}
}
}