예제 #1
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        NativeArray <MC_OnVisorNotified> na_TextMessages = m_OnVisorMessageReceived.ToComponentDataArray <MC_OnVisorNotified>(Allocator.TempJob);

        MC_OnVisorNotified mc_CurrentVisorNotification;

        for (int i = 0; i < na_TextMessages.Length; i++)
        {
            mc_CurrentVisorNotification = na_TextMessages[i];
            if (mc_CurrentVisorNotification.Intensity > 1)
            {
                FeedbackWindow.ShowFeedback(mc_CurrentVisorNotification.TileHandle, mc_CurrentVisorNotification.FeedbackHandle);
            }
        }

        if (na_TextMessages.Length > 0)
        {
            CleanupMessageBarrier.CreateCommandBuffer().DestroyEntity(m_OnVisorMessageReceived);
        }

        na_TextMessages.Dispose();

        return(inputDependencies);
    }