示例#1
0
    void OnCollisionEnter(Collision col)
    {
        Datastream stream = Datastream.cur;

        if (Datastream.enableFirewall)
        {
            damage = Mathf.CeilToInt((float)damage * 0.1f);
        }

        Datastream.healthAmount -= damage;
        stream.EmitCorruptionParticles(transform.position, damage / 10f);

        gameObject.SetActive(false);
        OnDeath();

        SplitterEnemySplit split = GetComponent <SplitterEnemySplit>();

        if (split)
        {
            for (int i = 0; i < split.spawnPos.Length; i++)
            {
                EnemyManager.cur.OnEnemyDeath();
            }
        }
    }