// Update is called once per frame void Update() { if (currentFindState == CurrentFindState.ShowingFind) { timer -= Time.deltaTime; if (timer < 0f) { currentFindObject.SetActive(false); currentFindState = CurrentFindState.Invisible; currentFindType = SubjectStatus.Null; } } else if (currentFindState == CurrentFindState.Invisible) { timer = hideTime; } }
public void OnRevealInfo(RevealInfo revealInfo) { if (currentFindType != revealInfo.subjectStatus) { currentFindObject.SetActive(true); if (revealInfo.subjectStatus == SubjectStatus.Infected) { ShowInfectedAvatar(); currentFindType = SubjectStatus.Infected; timer = hideTime; } else if (revealInfo.subjectStatus == SubjectStatus.Healthy) { ShowSusceptibleAvatar(); currentFindType = SubjectStatus.Healthy; timer = hideTime; } currentFindState = CurrentFindState.ShowingFind; } }