public void ApplyData() { if (EnemySelection.SelectedIndex > -1) { _command.SetParameter("EnemyID", EnemySelection.SelectedIndex); _command.SetParameter("Count", (int)EnemyCount.Value); _command.SetParameter("RespawnTime", (float)RespawnTime.Value); _command.SetParameter("SpawnRadius", (int)SpawnRadius.Value); } else { MessageBox.Show("Please select an enemy to spawn."); } }
public void ApplyData() { Genus2D.GameData.MapInfo mapInfo = Genus2D.GameData.MapInfo.GetMapInfo(MapSelection.SelectedIndex); if (MapX.Value < mapInfo.Width && MapY.Value < mapInfo.Height) { _command.SetParameter("MapID", MapSelection.SelectedIndex); _command.SetParameter("MapX", (int)MapX.Value); _command.SetParameter("MapY", (int)MapY.Value); } else { MessageBox.Show("Map X or Y coordinate out of map bounds."); } }
public void ApplyData() { _command.SetParameter("SpriteID", SpriteSelection.SelectedIndex - 1); }
public void ApplyData() { _command.SetParameter("Direction", (Genus2D.GameData.MovementDirection)DirectionSelection.SelectedIndex); }
public void ApplyData() { _command.SetParameter("Message", MessageBox.Text); }
public void ApplyData() { _command.SetParameter("Time", (float)TimerControl.Value); }
public void ApplyData() { if (MapSelection.SelectedIndex == -1) { MessageBox.Show("Select a valid map."); return; } if (EventSelection.SelectedIndex == -1) { MessageBox.Show("Select a valid event."); return; } _command.SetParameter("MapID", MapSelection.SelectedIndex); _command.SetParameter("EventID", EventSelection.SelectedIndex); _command.SetParameter("Property", GetMapEventProperty()); _command.SetParameter("MapX", (int)MapXSelection.Value); _command.SetParameter("MapY", (int)MapYSelection.Value); _command.SetParameter("MovementDirection", (Genus2D.GameData.MovementDirection)MovementSelection.SelectedIndex); _command.SetParameter("FacingDirection", (Genus2D.GameData.FacingDirection)DirectionSelection.SelectedIndex); _command.SetParameter("SpriteID", (int)SpriteSelection.SelectedIndex - 1); _command.SetParameter("RenderPriority", (Genus2D.GameData.RenderPriority)RenderPrioritySelection.SelectedIndex); _command.SetParameter("MovementSpeed", (Genus2D.GameData.MovementSpeed)MovementSpeedSelection.SelectedIndex); _command.SetParameter("MovementFrequency", (Genus2D.GameData.MovementFrequency)MovementFrequencySelection.SelectedIndex); _command.SetParameter("Passable", PassableCheck.Checked); _command.SetParameter("RandomMovement", RandomMovementCheck.Checked); _command.SetParameter("Enabled", EnabledCheck.Checked); }
public void ApplyData() { _command.SetParameter("Gold", (int)GoldControl.Value); }
public void ApplyData() { _command.SetParameter("ItemID", ItemSelection.SelectedIndex); _command.SetParameter("ItemAmount", (int)ItemAmount.Value); }
public void ApplyData() { int variableID = SystemVariables.SelectedIndex; if (variableID != -1) { if (RandomIntCheck.Checked) { _command.SetParameter("VariableID", variableID); _command.SetParameter("VariableType", Genus2D.GameData.VariableType.Integer); _command.SetParameter("VariableValue", 0); _command.SetParameter("RandomInt", true); _command.SetParameter("RandomFloat", false); RandomMin.Value = (int)RandomMin.Value; RandomMax.Value = (int)RandomMax.Value; _command.SetParameter("RandomMin", (int)RandomMin.Value); _command.SetParameter("RandomMax", (int)RandomMax.Value); } else if (RandomFloatCheck.Checked) { _command.SetParameter("VariableID", variableID); _command.SetParameter("VariableType", Genus2D.GameData.VariableType.Float); _command.SetParameter("VariableValue", 0f); _command.SetParameter("RandomInt", false); _command.SetParameter("RandomFloat", true); _command.SetParameter("RandomMin", (float)RandomMin.Value); _command.SetParameter("RandomMax", (float)RandomMax.Value); } else { Genus2D.GameData.VariableType type = (Genus2D.GameData.VariableType)VariableType.SelectedIndex; object value = null; try { switch (type) { case Genus2D.GameData.VariableType.Integer: value = int.Parse(ValueBox.Text); break; case Genus2D.GameData.VariableType.Float: value = float.Parse(ValueBox.Text); break; case Genus2D.GameData.VariableType.Bool: if (ValueBox.Text.ToLower() == "true") { value = true; } else if (ValueBox.Text.ToLower() == "false") { value = false; } else { throw new Exception("Value must be true or false."); } break; case Genus2D.GameData.VariableType.Text: value = ValueBox.Text; break; } _command.SetParameter("VariableID", variableID); _command.SetParameter("VariableType", type); _command.SetParameter("VariableValue", value); _command.SetParameter("RandomInt", false); _command.SetParameter("RandomFloat", false); } catch (Exception e) { MessageBox.Show("Error parsing variable value." + '\n' + e.Message); } } } else { MessageBox.Show("Select a valid sytstem variable."); } }
public void ApplyData() { _command.SetParameter("QuestID", QuestSelection.SelectedIndex); }
public void ApplyData() { Genus2D.GameData.ConditionalBranchType condition = GetConditionalType(); _command.SetParameter("ConditionalBranchType", condition); int mapID; switch (condition) { case Genus2D.GameData.ConditionalBranchType.PlayerPosition: mapID = PlayerMap.SelectedIndex; if (mapID == -1) { MessageBox.Show("Please select a valid map."); return; } _command.SetParameter("PlayerMapID", mapID); _command.SetParameter("PlayerMapX", (int)PlayerX.Value); _command.SetParameter("PlayerMapY", (int)PlayerY.Value); break; case Genus2D.GameData.ConditionalBranchType.MapEventPosition: mapID = MapEventMap.SelectedIndex; int eventID = MapEvent.SelectedIndex; if (mapID == -1) { MessageBox.Show("Please select a valid map."); return; } if (eventID == -1) { MessageBox.Show("Please select a valid map event."); return; } _command.SetParameter("MapEventMapID", mapID); _command.SetParameter("MapEventID", eventID); _command.SetParameter("MapEventMapX", (int)MapEventX.Value); _command.SetParameter("MapEventMapY", (int)MapEventY.Value); break; case Genus2D.GameData.ConditionalBranchType.ItemEquipped: _command.SetParameter("EquippedItemID", ItemEquippedSelection.SelectedIndex); break; case Genus2D.GameData.ConditionalBranchType.ItemInInventory: _command.SetParameter("InventoryItemID", ItemInInventorySelection.SelectedIndex); _command.SetParameter("InventoryItemAmount", (int)InventoryItemStack.Value); break; case Genus2D.GameData.ConditionalBranchType.SystemVariable: _command.SetParameter("VariableID", VariableSelection.SelectedIndex); _command.SetParameter("VariableType", GetVariableType()); switch (GetVariableType()) { case Genus2D.GameData.VariableType.Integer: _command.SetParameter("VariableIntegerValue", (int)VariableIntegerValue.Value); _command.SetParameter("ValueCondition", (Genus2D.GameData.ConditionValueCheck)VariableValueCondition.SelectedIndex); break; case Genus2D.GameData.VariableType.Float: _command.SetParameter("VariableFloatValue", (float)VariableFloatValue.Value); _command.SetParameter("ValueCondition", (Genus2D.GameData.ConditionValueCheck)VariableValueCondition.SelectedIndex); break; case Genus2D.GameData.VariableType.Bool: _command.SetParameter("VariableBoolValue", VariableBoolValue.SelectedIndex == 0 ? true : false); break; case Genus2D.GameData.VariableType.Text: _command.SetParameter("VariableTextValue", VariableTextValue.Text); _command.SetParameter("TextCondition", (Genus2D.GameData.ConditionalTextCheck)VariableTextCondition.SelectedIndex); break; } break; case Genus2D.GameData.ConditionalBranchType.QuestStatus: _command.SetParameter("QuestID", QuestSelection.SelectedIndex); _command.SetParameter("QuestStatus", GetQuestStatus()); _command.SetParameter("QuestProgressionCondition", QuestProgressionCondition.SelectedIndex); _command.SetParameter("QuestProgression", QuestProgressionSelection.SelectedIndex); break; case Genus2D.GameData.ConditionalBranchType.SelectedOption: _command.SetParameter("SelectedOption", (int)SelectedOptionControl.Value); break; case Genus2D.GameData.ConditionalBranchType.TerrainTag: _command.SetParameter("TerrainTag", (int)TerrainTagControl.Value); break; case Genus2D.GameData.ConditionalBranchType.PlayerDirection: _command.SetParameter("PlayerDirection", (Genus2D.GameData.FacingDirection)PlayerDirectionSelection.SelectedIndex); break; case Genus2D.GameData.ConditionalBranchType.PlayerGold: _command.SetParameter("Gold", (int)GoldControl.Value); break; } _command.SetParameter("Result", ResultSelection.SelectedIndex == 0 ? true : false); }
public void ApplyData() { _command.SetParameter("ShopID", ShopSelection.SelectedIndex); }