/// <summary> /// Creates doors for puzzle and calls OnPuzzleCreate. /// </summary> /// <param name="region"></param> public void OnCreate(Region region) { this.Region = region; foreach (var place in _places) { foreach (var door in place.Value.Doors.Where(x => x != null)) { // Beware, some doors are shared between puzzles if (door.EntityId != 0) { continue; } door.Info.Region = region.Id; region.AddProp(door); } } this.Script.OnPuzzleCreate(this); }
/// <summary> /// Creates doors for puzzle and calls OnPuzzleCreate. /// </summary> /// <param name="region"></param> public void OnCreate(Region region) { this.Region = region; foreach (var place in _places) { foreach (var door in place.Value.Doors.Where(x => x != null)) { // Beware, some doors are shared between puzzles if (door.EntityId != 0) continue; door.Info.Region = region.Id; region.AddProp(door); } } this.Script.OnPuzzleCreate(this); }