25 lines
449 B
C#
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);
|
|
}
|
|
|
|
}
|
|
}
|