public hourglass add_hourglass(float total_time, callback cb) { hourglass hg = new hourglass(total_time, cb); hourglasses.Add(hg.guid, hg); return(hg); }
private void Awake() { _audioSource = GetComponent <AudioSource>(); _hourglass = GetComponent <hourglass>(); instance = this; }
public void cancle_hourglass(hourglass hg) { if (hourglasses.ContainsKey(hg.guid)) { hourglasses [hg.guid].pause(); hourglasses.Remove(hg.guid); } }