Exemple #1
0
        private static void ShowMessage(Texture2D texture, ServerResponseData response)
        {
            MessageDisplayLogic.IncreaseTimesShown(response.MessageName);
            MessageDisplayLogic.SetLastMessageShownDate(response.MessageName);

            InfoMessage.ShowMessage(texture, response);
        }
Exemple #2
0
        public static void ResetIfShould(ServerResponseData response)
        {
            if (response.ResetToken < 0)
            {
                return;
            }

            var resetTokenKey = GetResetTokenKeyName(response);

            bool shouldReset = !EditorPrefs.HasKey(resetTokenKey) || (EditorPrefs.GetInt(resetTokenKey) != response.ResetToken);

            if (shouldReset)
            {
                                #if DEBUG_INFO_MESSAGE
                Debug.Log("Reset");
                                #endif
                //Reset mesage info
                MessageDisplayLogic.SetTimesMessageWasShown(response.MessageName, 0);
                MessageDisplayLogic.SetLastMessageShownDate(response.MessageName);
            }

            //Update reset token
            EditorPrefs.SetInt(resetTokenKey, response.ResetToken);
        }