Ejemplo n.º 1
0
    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;
    }