using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class BubbleMachine : MonoBehaviour
{
    [SerializeField] int healthPoints;

    [SerializeField] float initialShootTimer;
    private float shootTimer;

    [SerializeField] GameObject projectile;
    [SerializeField] float xOffset;
    [SerializeField] float yOffset;

    private void Update()
    {
        MachineShooting();
    }
    void MachineShooting()
    {
        shootTimer -= Time.deltaTime;
        if (shootTimer <= 0)
        {
            GameObject p = Instantiate(projectile, new Vector2(transform.position.x + xOffset, transform.position.y + yOffset), Quaternion.identity);
            shootTimer += initialShootTimer;
        }
    }
}
