2025-03-17 21:56:02 +08:00

25 lines
449 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Dot : MonoBehaviour
{
public float Score;
private void Awake()
{
}
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.layer == LayerMask.NameToLayer("PacMan"))
{
GameManager.instance.AddScore(Score);
Destroy(this.gameObject);
}
}
}