Skip to content

Instantly share code, notes, and snippets.

@curious-username
Last active December 1, 2021 04:37
Show Gist options
  • Save curious-username/b5e1915d324e2d841dbf367c46833df6 to your computer and use it in GitHub Desktop.
Save curious-username/b5e1915d324e2d841dbf367c46833df6 to your computer and use it in GitHub Desktop.
EnemyMissileMovement1
void Start()
{
_playerLocation = GameObject.Find("Player");
if(_playerLocation == null)
{
Debug.Log("Player not found");
}
}
void Update()
{
if(_playerLocation != null) {
if (gameObject != null)
{
Movement();
}
}
if(_playerLocation == null)
{
Destroy(gameObject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment