You've already forked super-mario-bros
mirror of
https://github.com/izzy2lost/super-mario-bros.git
synced 2026-03-26 16:58:05 -07:00
16 lines
380 B
C#
16 lines
380 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class StaticCoin : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
if (!other.CompareTag("Player")) return;
|
|
SoundGuy.Instance.PlaySound("smb_coin");
|
|
//Todo: Increase score and coin counter
|
|
Destroy(gameObject);
|
|
}
|
|
}
|