예제 #1
0
    public override void OnEditorGUI(UltimateTerrain uTerrain, IReadOnlyFlowGraph graph)
    {
#if UNITY_EDITOR
        var text = "";
        switch (combinerType)
        {
        case CombinerType.Add:
            text = "out = in1 + in2";
            break;

        case CombinerType.Sub:
            text = "out = in1 - in2";
            break;

        case CombinerType.Mul:
            text = "out = in1 * in2";
            break;

        case CombinerType.Min:
            text = "out = min(in1, in2)";
            break;

        case CombinerType.Max:
            text = "out = max(in1, in2)";
            break;
        }

        EditorUtils.CenteredBoxedLabelField(text);
        combinerType = (CombinerType)EditorGUILayout.EnumPopup(combinerType);
        if (combinerType == CombinerType.Add || combinerType == CombinerType.Sub)
        {
            EditorUtils.CenteredLabelField("Weight of inputs\nin1 <-> in2");
            inWeight = EditorGUILayout.Slider(inWeight, 0f, 1f, GUILayout.MinWidth(200));
        }
#endif
    }
예제 #2
0
 public Combiner(CombinerType combinerType)
 {
     _noises       = new List <INoise>();
     _combinerType = combinerType;
 }
예제 #3
0
 public ImplicitCombiner(CombinerType type)
 {
     this.CombinerType = type;
 }
 public ImplicitCombiner(CombinerType type)
 {
     this.CombinerType = type;
 }
 public Combiner()
 {
     combineType = CombinerType.Add;
 }
예제 #6
0
 public Combiner(CombinerType type)
 {
     this.CombinerType = type;
 }
예제 #7
0
 public ImplicitCombiner(CombinerType type) => CombinerType = type;