Ejemplo n.º 1
0
    void OnShotBy(ShotInfo si)
    {
        var level = GameObject.FindGameObjectWithTag("Level").GetComponent <LevelInit>();

        level.RemoveFish(gameObject);
        foreach (var emitter in m_emitters)
        {
            emitter.Emit(Random.Range(30, 60));
            emitter.transform.parent = null;
            GameObject.Destroy(emitter.gameObject, 2.5f);
        }
        m_barrel.RemoveFish(gameObject);

        GenerateLoot();

        Destroy(gameObject);
    }