void UpdateIndicator(Objective objective) { bool visible = ShowWhenActive && objective.GetState() == ObjectiveState.Active; visible |= ShowWhenComplete && objective.GetState() == ObjectiveState.Completed; indicatorMeshComponent.SetIsVisible(objective.Agent, visible); }
void UpdateIndicator(Quest quest) { bool visible = ShowWhenAvailable && quest.GetState() == QuestState.None; visible |= ShowWhenActive && quest.GetState() == QuestState.Active; visible |= ShowWhenComplete && quest.GetState() == QuestState.Completed; indicatorMeshComponent.SetIsVisible(quest.Agent, visible); }
void SetVisible(ScriptEventData sed, bool visible) { if (AffectEveryone) { meshComponent.SetIsVisible(visible); return; } ISimpleData idata = sed.Data.AsInterface <ISimpleData>(); if (idata != null && idata.AgentInfo != null) { meshComponent.SetIsVisible(idata.AgentInfo.SessionId, visible); } else { Log.Write(LogLevel.Error, "Visibility", "Event data did not contain agent info."); } }
private void FlashVisibility(double seconds) { // This coroutine will run for the lifetime of the script. while (true) { Wait(TimeSpan.FromSeconds(seconds)); component.SetIsVisible(!component.GetIsVisible()); } }
// Logic! private void HideEventExecute(ScriptEventData data) { currentVisibility = false; component.SetIsVisible(false); }