Last active
November 28, 2017 16:01
-
-
Save Hyperparticle/5bcd6b864591504a98611b77805cdeec to your computer and use it in GitHub Desktop.
Draw Controller - Version 1
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 class DrawController : MonoBehaviour | |
{ | |
// ... | |
private void AddShapeVertex(Vector2 position) | |
{ | |
if (CurrentShapeToDraw == null) { | |
// ... | |
} else { | |
if (IsDrawingShape) { | |
CurrentShapeToDraw.AddVertex(position); | |
} else { | |
CurrentShapeToDraw.SimulatingPhysics = true; | |
CurrentShapeToDraw = null; | |
} | |
} | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment