79542202

Date: 2025-03-28 18:46:30
Score: 0.5
Natty:
Report link
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);
}
  }
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user30096257