Created
November 12, 2017 23:49
-
-
Save oismaelash/7c6e95c2b718c53e89d9d5a304daf2b0 to your computer and use it in GitHub Desktop.
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
private void StartZigZag() | |
{ | |
transform.Translate(Vector3.left * velocityMovimentEnemy * Time.deltaTime); | |
transform.Translate(Vector3.up * velocityMovimentEnemy * Time.deltaTime); | |
if (transform.position.y >= m_LimitDistanceMax) | |
{ | |
print("Start down"); | |
transform.Translate(Vector3.down * velocityMovimentEnemy * Time.deltaTime); | |
} | |
if (transform.position.y <= (m_LimitDistanceMin)) | |
{ | |
print("Start Up"); | |
transform.Translate(Vector3.up * velocityMovimentEnemy * Time.deltaTime); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment