public override IEnumerator OnLoad(Dictionary <string, object> args = null) { _messageText.text = args[paramMessageKey].ToString(); _duration = (float)args[paramDurationKey]; _instanceMsgType = (InstanceMsgType)args[paramInstanceMsgTypeKey]; _messageText.color = _instanceMsgType == InstanceMsgType.WARNING ? _warningTypeColor : _normalTypeColor; yield return(base.OnLoad(args)); }
public static void ShowPopupInstanceMsg(string message, float duration, InstanceMsgType instanceMsgType) { Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add(paramMessageKey, message); dic.Add(paramDurationKey, duration); dic.Add(paramInstanceMsgTypeKey, instanceMsgType); StateManager.instance.PushState(GameConstants.STATENAME_POPUPINSTANCEMAG, dic); }