コード例 #1
0
        void UpdateIndicator(Objective objective)
        {
            bool visible = ShowWhenActive && objective.GetState() == ObjectiveState.Active;

            visible |= ShowWhenComplete && objective.GetState() == ObjectiveState.Completed;

            indicatorMeshComponent.SetIsVisible(objective.Agent, visible);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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.");
            }
        }
コード例 #4
0
    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());
        }
    }
コード例 #5
0
    // Logic!

    private void HideEventExecute(ScriptEventData data)
    {
        currentVisibility = false;
        component.SetIsVisible(false);
    }