gimm-platformer-project/Assets/Scripts/CoinCollect.cs

12 lines
283 B
C#

using UnityEngine;
public class CoinCollect : MonoBehaviour
{
public PlatformManager platformManagerScript;
private void OnTriggerEnter2D(Collider2D collision)
{
ScoreCounter.scoreAmount += 1;
platformManagerScript.NewPlatform();
}
}