csharp スコアを加算し,コンソールに出力する

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp スコアを加算し,コンソールに出力する相关的知识,希望对你有一定的参考价值。

using UnityEngine;
using Zenject;

public class ScoreManager : MonoBehaviour, IPickup
{
    private int score;
    private void Start () => score = 0;

    void IPickup.OnPickup ( int scorePoint )
    {
        score += scorePoint;
        Debug.Log($"Score: {score}");    // コンソールにスコアを出力する
    }
}

以上是关于csharp スコアを加算し,コンソールに出力する的主要内容,如果未能解决你的问题,请参考以下文章