Created
July 27, 2019 16:19
-
-
Save kirkins/6c435a8e0111c26d66d519e0b912808b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
void FixedUpdate() | |
{ | |
//rigidBody.AddForce(Vector3.down * 5); | |
if (direction) | |
{ | |
transform.localScale += new Vector3(sizeValue, sizeValue, sizeValue) * Time.deltaTime; | |
sizeCounter++; | |
if (sizeCounter > 50) | |
{ | |
direction = !direction; | |
} | |
} | |
else | |
{ | |
transform.localScale -= new Vector3(sizeValue, sizeValue, sizeValue) * Time.deltaTime; | |
sizeCounter--; | |
if (sizeCounter < 2) | |
{ | |
direction = !direction; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment