Stranar/Assets/Scripts/yolo.cs
2022-06-27 11:54:53 +02:00

35 lines
716 B
C#

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);
}
}