error - the nested type 'CollisionEvent' does not exist in the type 'UnityEngine.ParticleSystem'

Hello, I am new to Unity, I installed it only a few hours ago. I have unity 5 but I am following a tutorial on Unity 4 or less. I installed the package SampleAssets and imported it, but I have errors. I didn’t change anything. Here’s the code:

using UnityEngine;

namespace UnitySampleAssets.Effects
{
    public class WaterHoseParticles : MonoBehaviour
    {
        private ParticleSystem.CollisionEvent[] collisionEvents = new ParticleSystem.CollisionEvent[16];

        public static float lastSoundTime;
        public float force = 1;

        private void OnParticleCollision(GameObject other)
        {

            int safeLength = particleSystem.safeCollisionEventSize;

            if (collisionEvents.Length < safeLength)
            {
                collisionEvents = new ParticleSystem.CollisionEvent[safeLength];
            }

            int numCollisionEvents = particleSystem.GetCollisionEvents(other, collisionEvents);
            int i = 0;

            while (i < numCollisionEvents)
            {

                if (Time.time > lastSoundTime + 0.2f)
                {
                    lastSoundTime = Time.time;
                }

                var col = collisionEvents*.collider;*

if (col.attachedRigidbody != null)
{
Vector3 vel = collisionEvents*.velocity;*
col.attachedRigidbody.AddForce(vel*force, ForceMode.Impulse);
}

other.BroadcastMessage(“Extinguish”, SendMessageOptions.DontRequireReceiver);

i++;
}
}
}
}

In Unity 5, the collision class for the particle system has been moved from ParticleSystem.CollisionEvent to ParticleCollisionEvent.

For all “big number upgrades” (as in 4 to 5 as opposed to 5.1 to 5.2), Unity might change the code base in ways that will break old projects. This means that tutorials that worked for Unity 4 won’t always work directly for Unity 5.

If you’ve done some programming before, it shouldn’t be a problem - just grab the API and google to find classes and methods that looks similar to the ones that worked before. If you’re new to the whole thing, I’d suggest sticking to tutorials for Unity 5.

It’s also completely possible to have both Unity 4 and 5 installed at the same time, so if you really want some old tutorials to work out of the box, just download 4 and run them.