public void OnClickAddPreset() { int v = drop_preset_types.GetComponent <Dropdown> ().value; Debug.Log("add preset " + v.ToString() + " " + _presetValue.ToString()); PolyWorldController.PresetType t = v == 0 ? PolyWorldController.PresetType.Sphere : v == 1 ? PolyWorldController.PresetType.Cube : PolyWorldController.PresetType.Floor; _polyWorldController.AddPreset(t, _presetValue, _presetFillrate); }
public void AddPreset(PolyWorldController.PresetType t, int value, float fillrate) { switch (t) { case PolyWorldController.PresetType.Cube: AddCube(value, fillrate); break; case PolyWorldController.PresetType.Sphere: AddSphere(value, fillrate); break; case PolyWorldController.PresetType.Floor: //plane AddFloor(value, fillrate); break; } }