Skip to content

Commit

Permalink
fix: move method not firing and too slow
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Jan 31, 2021
1 parent d471172 commit 56ce2fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AdjustableLoad : NetworkBehaviour

public void Start()
{
NetIdentity.OnStartAuthority.AddListener(() => StartCoroutine(Move()));
StartCoroutine(Move());
}

private IEnumerator Move()
Expand All @@ -23,7 +23,7 @@ private IEnumerator Move()
transform.position += transform.up * MovementSpeed * Time.deltaTime;
transform.Rotate(0, 0, Time.deltaTime * RotateSpeed);

yield return new WaitForSeconds(Random.Range(0f, 5f));
yield return new WaitForSeconds(Random.Range(0f, 0.5f));
}
}
}
Expand Down

0 comments on commit 56ce2fd

Please sign in to comment.