public override void OnInspectorGUI() { SingleDice combo = target as SingleDice; base.OnInspectorGUI(); if (combo == null) { return; } combo.GUIRequiredValues = EditorGUILayout.IntField("Dice Value: ", combo.GUIRequiredValues); }
public void ComboTestSingleDice() { SingleDice comboType = ScriptableObject.CreateInstance <SingleDice>(); const int diceCount = 5; const int expectedCombos = 1; var gameObject = new GameObject(); comboType.GUIRequiredValues = 1; List <Dice> diceList = new List <Dice>(); for (int i = 0; i < diceCount; i++) { diceList.Add(gameObject.AddComponent <Dice>()); diceList[i].TestRollValueSetter(i); } Assert.AreEqual(expectedCombos, comboType.CheckCombo(diceList, false), 0); }