public override void OnInspectorGUI() { BoundaryGenerator boundaryGenerator = (BoundaryGenerator)target; boundaryGenerator.edge = boundaryGenerator.gameObject.GetComponent <EdgeCollider2D>(); serializedObject.Update(); EditorGUILayout.PropertyField(enumProp); switch (boundaryGenerator.shape) { case BoundaryGenerator.Shape.CIRCLE: case BoundaryGenerator.Shape.SEMICIRCLE: boundaryGenerator.radius = EditorGUILayout.FloatField("Radius", boundaryGenerator.radius); break; case BoundaryGenerator.Shape.SQUARE: boundaryGenerator.width = EditorGUILayout.FloatField("Width", boundaryGenerator.width); break; case BoundaryGenerator.Shape.RECTANGLE: boundaryGenerator.width = EditorGUILayout.FloatField("Width", boundaryGenerator.width); boundaryGenerator.height = EditorGUILayout.FloatField("Height", boundaryGenerator.height); break; } if (GUILayout.Button("Generate")) { boundaryGenerator.Generate(); } serializedObject.ApplyModifiedProperties(); }
public InitialGenerator(RevWalk w, Generator s, BoundaryGenerator parent) // [henon] parent needed because we cannot access outer instances in C# { walk = w; held = new FIFORevQueue(); source = s; source.shareFreeList(held); this.parent = parent; }
// [henon] parent needed because we cannot access outer instances in C# public InitialGenerator(RevWalk w, Generator s, BoundaryGenerator parent) { _walk = w; _held = new FIFORevQueue(); _source = s; _source.shareFreeList(_held); _parent = parent; }
public void CanGenerate() { var TestObject = new BoundaryGenerator(Canister.Builder.Bootstrapper.Resolve <Mirage.Random>()); TestObject.CanGenerate(typeof(TestClass).GetMethod("TestMethod").GetParameters()[0]).Should().BeTrue(); }