I want my kill streak sound to be triggered when the KSsound value reaches 250. However the sound doesn't play when the value reaches 250.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KSsoundScript : MonoBehaviour {
public static int KSsound;
AudioSource clip;
void Awake ()
{
clip = GetComponent ();
}
void Update ()
{
if (KSsound >= 250)
{
clip.Play ();
}
}
}
↧