/// <summary> /// ミッションクリアのマーキー表示 /// </summary> static public void SetupMissionClearMessage() { ClearMissionClearMessage(); //---------------------------------------- // 新規達成演出前のアチーブメントがあるならメッセージ表示 //---------------------------------------- if (ResidentParam.m_AchievementClear != null && ResidentParam.m_AchievementClear.m_BufferSize > 0) { m_MsgBarResetText = true; m_MsgBarRequestInputIndex = 0; for (int i = 0; i < ResidentParam.m_AchievementClear.m_BufferSize; ++i) { //---------------------------------------- // アチーブメントが演出が必要なステータス状況かチェック //---------------------------------------- PacketAchievement cAchievement = ResidentParam.m_AchievementClear[i]; if (cAchievement == null) { continue; } if (cAchievement.server_state != (int)ServerDataDefine.ACHIEVEMENT_STATE.ACHIEVEMENT_STATE_S1_T1_E0_S0) { continue; } // クエストミッションはミッション画面に表示されず、直接アイテムを受け取るので弾く if (cAchievement.achievement_category_id == (int)ServerDataDefine.ACHIEVEMENT_CATEGORY_TYPE.QUEST) { continue; } HeaderMessage message = new HeaderMessage(); message.fix_id = cAchievement.fix_id; message.message = string.Format(GameTextUtil.GetText("achievement_complete"), TextUtil.RemoveNewLine(cAchievement.draw_msg)); message.message_color = Color.white; message.bg_color = HexColor.ToColor("#f90974"); message.type = HeaderMessage.MESSAGE_TYPE.ACHIEVEMENT_CLEAR; message.priority = ResidentParam.m_AchievementClear.m_BufferSize - i; m_MsgBarOtherMessageList.Add(message); } m_MsgBarOtherMessageList.Sort(HeaderMessage.SortCompare); } }
/** * @brief NGUIのカラータグの文字数を返す * return カラータグの文字数 [FFAA00]=8 [-]=3 それ以外は0 */ static public int ParseSymbol(string text, int index, List <Color> colors, bool premultiply) { int length = text.Length; if (index + 2 < length) { if (text[index + 1] == '-') { if (text[index + 2] == ']') { if (colors != null && colors.Count > 1) { colors.RemoveAt(colors.Count - 1); } return(3); } } else if (index + 7 < length) { if (text[index + 7] == ']') { if (colors != null) { Color c = HexColor.ToColor(text.Substring(index + 1, 6)); if (HexColor.FormColorString(c).Substring(1, 6) != text.Substring(index + 1, 6)) { return(0); } c.a = colors[colors.Count - 1].a; if (premultiply && c.a != 1f) { c = Color.Lerp(ColorUtil.COLOR_INVISIBLE, c, c.a); } colors.Add(c); } return(8); } } } return(0); }
/// <summary> /// 属性ごとの色を取得する /// </summary> /// <param name="element_type"></param> /// <returns></returns> public static Color GetElementLabelColor(MasterDataDefineLabel.ElementType element_type) { string hex = ""; switch (element_type) { case MasterDataDefineLabel.ElementType.NAUGHT: hex = "#c6c6c6"; break; case MasterDataDefineLabel.ElementType.FIRE: hex = "#ff372c"; break; case MasterDataDefineLabel.ElementType.WATER: hex = "#41b6ff"; break; case MasterDataDefineLabel.ElementType.LIGHT: hex = "#ffff00"; break; case MasterDataDefineLabel.ElementType.DARK: hex = "#b400ff"; break; case MasterDataDefineLabel.ElementType.WIND: hex = "#25b300"; break; case MasterDataDefineLabel.ElementType.HEAL: hex = "#ff8c00"; break; } if (hex.IsNullOrEmpty()) { return(Color.white); } return(HexColor.ToColor(hex)); }
// Use this for initialization void Start() { BindingText = "TextBindingTest<color=#00ffffff>あいうえお</color>"; BindingTextColor = Color.cyan; BindingColor = HexColor.ToColor("#00ffff77"); }