コード例 #1
0
        public void ShouldGenerateValue()
        {
            var gen        = new RandomIntGenerator(new ColumnDataTypeDefinition("TinyInt", false));
            var firstValue = gen.GenerateValue(1);

            Assert.That(firstValue, Is.Not.Null);
        }
コード例 #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        targetObject = (RandomIntGenerator)target;

        var weightPool  = targetObject.AvailablePool;
        var totalWeight = targetObject.TotalWeight;

        GUILayout.Space(10);
        GUILayout.Label("Total Weight: " + totalWeight);
        GUILayout.Space(5);
        DrawPercents(weightPool, totalWeight);
    }
コード例 #3
0
 public void Setup() {
     sut = new RandomIntGenerator(1, 5, new Random(0));
 }