Created
November 28, 2017 16:27
-
-
Save Hyperparticle/eb97e2ff0e2f29f2656a290c97f9bbf6 to your computer and use it in GitHub Desktop.
Abstract class for all shapes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class DrawShape : MonoBehaviour | |
{ | |
/// <summary> | |
/// Whether all the points in the shape have been specified | |
/// </summary> | |
public abstract bool ShapeFinished { get; } | |
/// <summary> | |
/// The status of whether the shape is simulating its physics. | |
/// Setting this property will enable or disable physics. | |
/// </summary> | |
public abstract bool SimulatingPhysics { get; set; } | |
/// <summary> | |
/// Adds a new vertex to the shape. The shape should | |
/// also update its mesh and collider. | |
/// </summary> | |
public abstract void AddVertex(Vector2 vertex); | |
/// <summary> | |
/// Updates the last added vertex with the new given position. | |
/// The shape should also update its mesh and collider. | |
/// </summary> | |
public abstract void UpdateShape(Vector2 newVertex); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment