public void OnTriggerEnter(Collider other) { if (other.tag == "Player" && other.GetComponent <PlayerStats>().teamId != m_team) { players.Add(other.GetComponent <PlayerStats>()); Globals.WriteLog("IceSkill3: Meto a " + other.GetComponent <PlayerStats>().id); BuffSlow bs = other.GetComponent <PlayerStats>().gameObject.AddComponent <BuffSlow>(); bs.Init(m_ralentizacion, m_duration, m_skillId, m_handler.m_PlayerStats); } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Player" && other.GetComponent <PlayerStats>().teamId != m_team) { BuffSlow buff = other.gameObject.AddComponent <BuffSlow>(); buff.Init(100, 2f, m_skillId, m_handler.m_PlayerStats); GetComponent <ParticleSystem>().Stop(); Destroy(gameObject, 1f); } }