Update EnemyReturn Script Optimizations
This commit is contained in:
parent
54446d676b
commit
1d0a89a9ef
@ -29,14 +29,7 @@ public class EnemyReturn : Physics2DObject
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (isReturning)
|
||||
{
|
||||
movement = new Vector2(0f, returnSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
movement = new Vector2(0f, -normalSpeed);
|
||||
}
|
||||
movement = (isReturning) ? new Vector2(0f, returnSpeed) : new Vector2(0f, -normalSpeed);
|
||||
}
|
||||
|
||||
//FixedUpdate is called every frame when the physics are calculated
|
||||
|
Loading…
x
Reference in New Issue
Block a user