1
0

initial commit

This commit is contained in:
LupiNexMedia
2026-04-28 09:32:03 +02:00
commit f84f5c592b
2173 changed files with 376140 additions and 0 deletions
@@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Collectible2D : MonoBehaviour
{
public float rotationSpeed = 0.5f;
public GameObject onCollectEffect;
// Update is called once per frame
void Update()
{
transform.Rotate(0, 0, rotationSpeed);
}
private void OnTriggerEnter2D(Collider2D other) {
// Check if the other object has a PlayerController2D component
if (other.GetComponent<PlayerController2D>() != null) {
// Destroy the collectible
Destroy(gameObject);
// Instantiate the particle effect
Instantiate(onCollectEffect, transform.position, transform.rotation);
}
}
}