void Update() { timer -= Time.deltaTime; if (timer <= 0) { timer = timeBetweenDigs; DiggingScript.AddTrash(5); } }
public override void Remove() { DiggingScript.MaxTrash -= 50; DiggingScript.AddTrash(0); GameObject.Destroy(gameObject); }