本文整理汇总了C#中Puzzle.GetPlace方法的典型用法代码示例。如果您正苦于以下问题:C# Puzzle.GetPlace方法的具体用法?C# Puzzle.GetPlace怎么用?C# Puzzle.GetPlace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Puzzle
的用法示例。
在下文中一共展示了Puzzle.GetPlace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
var chestPlace = puzzle.GetPlace("ChestPlace");
puzzle.LockPlace(lockedPlace, "Lock");
chestPlace.AddProp(new Chest(puzzle, "KeyChest"), Placement.Random);
}
示例2: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var place = puzzle.GetPlace("PuzzlePlace");
place.SpawnSingleMob("Mob1", 50002, 3); // Red Fox
place.SpawnSingleMob("Mob2", 50003, 2); // Gray Fox
}
示例3: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
var chestPlace = puzzle.GetPlace("ChestPlace");
var key = puzzle.LockPlace(lockedPlace, "Lock");
var chest = new Chest(puzzle, "KeyChest");
chest.Add(Item.Create(id: 2000, amountMin: 10, amountMax: 30));
chest.Add(key);
chestPlace.AddProp(chest, Placement.Corner4);
chestPlace.SpawnSingleMob("Trap", "Mob3", Placement.Corner4);
chestPlace.SpawnSingleMob("ChestMob1", "Mob1");
lockedPlace.SpawnSingleMob("ChestMob2", "Mob2");
}
示例4: OnMonsterDead
public override void OnMonsterDead(Puzzle puzzle, MonsterGroup group)
{
if (group.Remaining != 0)
return;
puzzle.GetPlace("Place").OpenAllDoors();
}
示例5: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var place = puzzle.GetPlace("PuzzlePlace");
place.SpawnSingleMob("Mob1", 120006, 3); // Young Country Rat
place.SpawnSingleMob("Mob2", 30005, 8); // White Spiderling
}
示例6: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
puzzle.LockPlace(lockedPlace, "Boss");
lockedPlace.SpawnSingleMob("Mob1", 12001, 6); // Ghost Armor
lockedPlace.CloseAllDoors();
}
示例7: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
var zwitch = new Switch("Switch", lockedPlace.LockColor);
lockedPlace.AddProp(zwitch, Placement.Center);
puzzle.LockPlace(lockedPlace);
}
示例8: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
puzzle.LockPlace(lockedPlace);
lockedPlace.SpawnSingleMob("Mob1", 10101, 6); // Goblins
lockedPlace.SpawnSingleMob("Mob2", 1000, 1); // Traveler A
lockedPlace.CloseAllDoors();
}
示例9: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var propPlace = puzzle.GetPlace("PropPlace");
for (int i = 1; i <= 3; ++i)
{
var oreDeposit = new OreDeposit(22000, "Deposit" + i);
propPlace.AddProp(oreDeposit, Placement.Ore);
}
}
示例10: 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");
}
}
示例11: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var lockedPlace = puzzle.GetPlace("LockedPlace");
var key = puzzle.LockPlace(lockedPlace, "Boss");
var chest = new Chest(puzzle, "KeyChest");
lockedPlace.AddProp(chest, Placement.Center);
chest.Info.Direction = MabiMath.DegreeToRadian(90);
chest.Add(Item.Create(GoddessPass));
chest.Add(key);
}
示例12: OnPuzzleCreate
public override void OnPuzzleCreate(Puzzle puzzle)
{
var propPlace = puzzle.GetPlace("PropPlace");
int propId;
uint color;
for (int i = 1; i <= 3; ++i)
{
GetRandom(puzzle, out propId, out color);
var patch = new HerbPatch(propId, "Herb" + i, color);
propPlace.AddProp(patch, Placement.Herb);
}
}
示例13: 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);
}
示例14: 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);
}
}
示例15: 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);
}