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