using System.Collections; using System.Collections.Generic; using UnityEngine; public class yolo : MonoBehaviour { public Pukvbrane pukvbrane; public GameObject totok; public bombspawner bs; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } void OnCollisionEnter(Collision other) { if(other.gameObject.tag == "Player"){ pukvbrane.collectedcubes = 0; } else if (other.gameObject.tag == "puk"){ Destroy(other.gameObject); pukvbrane.PlaceObj(); } bs.PlaceObj(); Destroy(this.gameObject); } }