示例#1
0
    private void UseAddCoinCheat()
    {
        CharacterStatus status = _player.GetComponent <CharacterStatus>();

        for (int i = 0; i < 10; ++i)
        {
            status.AddCoin();
        }
    }
示例#2
0
    private void ItemGathered()
    {
        SoundManager.instance.PlayItemGetSound();

        CharacterStatus charStatus = _player.GetComponent <CharacterStatus>();

        if (_itemType == ItemType.Hp)
        {
            charStatus.AddHpItem();
        }
        else if (_itemType == ItemType.Mp)
        {
            charStatus.AddMpItem();
        }
        else if (_itemType == ItemType.Coin)
        {
            charStatus.AddCoin();
        }

        Destroy(gameObject);
    }