コード例 #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
ファイル: ImplicitCombiner.cs プロジェクト: JPMMaia/tuguiadas
 public ImplicitCombiner(CombinerType type)
 {
     this.CombinerType = type;
 }
コード例 #4
0
 public ImplicitCombiner(CombinerType type)
 {
     this.CombinerType = type;
 }
コード例 #5
0
 public Combiner()
 {
     combineType = CombinerType.Add;
 }
コード例 #6
0
ファイル: combiner.cs プロジェクト: bholcomb/gameEngine
 public Combiner(CombinerType type)
 {
     this.CombinerType = type;
 }
コード例 #7
0
 public ImplicitCombiner(CombinerType type) => CombinerType = type;