コード例 #1
0
ファイル: BuyFishScript.cs プロジェクト: andr4376/FishTank
    public void Buy()
    {
        if (ScoreManager.Score >= Price)
        {
            BoidsManager.Spawn(fishType);

            ScoreManager.Score -= Price;


            Debug.Log(fishType.ToString() + " bought!");
        }
        else
        {
            Debug.Log("not enough money");

            // SoundManager.PlayAudio(SOUNDS.INVALID_INPUT, 0.3f);
        }
    }
コード例 #2
0
    public void Buy()
    {
        if (ScoreManager.Score >= Price)
        {
            Upgrades.PointModifiers[fishType] += 1f;

            ScoreManager.Score -= Price;

            UpdateText();


            Debug.Log(fishType.ToString() + " upgrade bought!");
        }
        else
        {
            Debug.Log("not enough money");

            // SoundManager.PlayAudio(SOUNDS.INVALID_INPUT, 0.3f);
        }
    }