/// <summary> /// /// </summary> /// <param name="stair"></param> /// <param name="dungeon"></param> public StairControl(Stair stair, Dungeon dungeon) { InitializeComponent(); TargetBox.SetTarget(dungeon, stair.Target); DirectionBox.DataSource = Enum.GetValues(typeof(StairType)); DirectionBox.SelectedItem = stair.Type; Stair = stair; }
/// <summary> /// /// </summary> /// <param name="pit">Pit handle</param> /// <param name="dungeon">Dungeon handle</param> public PitControl(Pit pit, Dungeon dungeon) { InitializeComponent(); Dungeon = dungeon; IsHiddenBox.Checked = pit.IsHidden; IsIllusionBox.Checked = pit.IsIllusion; TargetBox.SetTarget(dungeon, pit.Target); DamageBox.Dice = pit.Damage; DifficultyBox.Value = pit.Difficulty; Pit = pit; }
/// <summary> /// Constructor /// </summary> /// <param name="script">Script handle</param> /// <param name="dungeon">Dungeon handle</param> public SetToControl(SetTo script, Dungeon dungeon) { if (dungeon == null || script == null) { MessageBox.Show("Dungeon == NULL or script == NULL !", "SetToControl", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } InitializeComponent(); Action = script; Dungeon = dungeon; SquareControl.SetSquare(script.Square); TargetBox.SetTarget(Dungeon, Action.Target); }
/// <summary> /// /// </summary> /// <param name="script"></param> public DeactivateTargetControl(DeactivateTarget script, Dungeon dungeon) { InitializeComponent(); if (script != null) { Action = script; } else { Action = new DeactivateTarget(); } TargetBox.SetTarget(dungeon, Action.Target); }
/// <summary> /// Constructor /// </summary> /// <param name="script">Script handle</param> /// <param name="dungeon">Dungeon handle</param> public SpawnMonsterControl(SpawnMonster script, Dungeon dungeon) { InitializeComponent(); Action = script ?? new SpawnMonster(); TargetBox.Dungeon = dungeon; TargetBox.SetTarget(script.Target); MonsterNameBox.Items.AddRange(ResourceManager.GetAssets <Monster>().ToArray()); if (!string.IsNullOrEmpty(SpawnScript.MonsterName)) { MonsterNameBox.SelectedItem = SpawnScript.MonsterName; } }
/// <summary> /// /// </summary> /// <param name="script"></param> /// <param name="dungeon"></param> public TeleportControl(Teleport script, Dungeon dungeon) { InitializeComponent(); if (script != null) { Action = script; } else { Action = new Teleport(); } TargetBox.Dungeon = dungeon; TargetBox.SetTarget(((Teleport)Action).Target); TargetBox.TargetChanged += new TargetControl.TargetChangedEventHandler(TargetBox_TargetChanged); }