private void Update() { if (PathPassed >= 1f) { PlayerResources.Lives -= damage; Die(false); return; } var newPosition = _path.Move(Time.deltaTime, speed); EnemyGrid.UpdatePosition(this, newPosition); transform.position = newPosition; }
public virtual void Init() { _path = GameManager.Instance.EnemyPathProvider.GetPath(); transform.position = _path.Move(0, 0); EnemyGrid.InitPosition(this); }