Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (producing)
        {
            timer += Time.deltaTime;
            if (timer > spawnTime)
            {
                timer = 0;

                res.GenerateResource(transform.position + Vector3.up, spawnType);
            }
        }
    }