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 }
public Combiner(CombinerType combinerType) { _noises = new List <INoise>(); _combinerType = combinerType; }
public ImplicitCombiner(CombinerType type) { this.CombinerType = type; }
public Combiner() { combineType = CombinerType.Add; }
public Combiner(CombinerType type) { this.CombinerType = type; }
public ImplicitCombiner(CombinerType type) => CombinerType = type;