Пример #1
0
    public void OnCollisionEnter(Collision other)
    {
        CharacterInstance character = other.gameObject.GetComponent <CharacterInstance>();

        if (other.gameObject.name == "Character")
        {
            character.AddLifeFragments(1);

            Destroy(gameObject);
        }
    }