With this code,
using UnityEngine;
using System.Collections;
public class PainSound : MonoBehaviour {
public AudioClip whenHurt;
private AudioSource source;
void Awake () {
source = GetComponent<AudioSource>();
}
void Update () {
}
void OnCollisionEnter (Collision coll)
{
if (coll.relativeVelocity.magnitude > 30f && other.tag = "projectile" || other.tag = "car")
source.PlayOneShot(whenHurt,1F);
}
}
I get CS1525, Unexpected symbol ‘=’. Why?
I need help urgently, project is due soon!