Exemplo 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;
    }
Exemplo n.º 2
0
 public virtual void Init()
 {
     _path = GameManager.Instance.EnemyPathProvider.GetPath();
     transform.position = _path.Move(0, 0);
     EnemyGrid.InitPosition(this);
 }