using UnityEngine;
public class newmonoBehaviour : MonoBehaviour
{
public float rotationspeed;
public GameObject onCollectEffect;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.rotate(0, rotationspeed, 0);
}
private void OnTriggerEnter(Collider other) {
if (other.CompareTag("Player")) {
}
// Destroy the collectible
Destroy(gameObject);
// instantiate the particle effect
Instantiate(onCollectEffect, transform.position, transform.rotation);
}
}
}