17 lines
400 B
C#
17 lines
400 B
C#
using System;
|
|
using Code.GameplayServices;
|
|
using UnityEngine;
|
|
|
|
namespace Code.PassingObjects
|
|
{
|
|
public class Coin : PassingObject
|
|
{
|
|
[SerializeField] private int countOnActivate;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
PlayerScoreService.Instance.AddScore(countOnActivate);
|
|
PassingObjectsManager.Instance.KillChild(this);
|
|
}
|
|
}
|
|
} |