Esempio n. 1
0
        public string ToDebugString()
        {
            if (VariableId.IsEmpty)
            {
                return("[null]");
            }

            if (TableId.IsEmpty)
            {
                return(VariableId.ToDebugString());
            }

            return(string.Format(StringFormat, TableId.ToDebugString(), VariableId.ToDebugString()));
        }
Esempio n. 2
0
        public string ToDebugString()
        {
            switch (m_Type)
            {
            case VariantType.Null:
                return("null");

            case VariantType.Bool:
                return(m_BoolValue ? "true" : "false");

            case VariantType.Int:
                return(m_IntValue.ToString());

            case VariantType.UInt:
                return(m_UIntValue.ToString("X8"));

            case VariantType.Float:
                return(m_FloatValue.ToString());

            case VariantType.StringHash:
                return(string.Format("\"{0}\"", m_StringHashValue.ToDebugString()));

            default:
                throw new InvalidOperationException("Unrecognized variant type " + m_Type.ToString());
            }
        }
Esempio n. 3
0
        public bool TryEvaluate(TagEventData inEventData, object inContext, out IEnumerator outCoroutine)
        #endif // EXPANDED_REFS
        {
            StringHash32 id = inEventData.Type;
            Handler      handler;

            if (m_Handlers.TryGetValue(id, out handler))
            {
                outCoroutine = handler.Execute(inEventData, inContext);
                return(true);
            }

            if (m_Base != null)
            {
                return(m_Base.TryEvaluate(inEventData, inContext, out outCoroutine));
            }

            Debug.LogErrorFormat("[TagStringEventHandler] Unable to handle event type '{0}'", id.ToDebugString());
            outCoroutine = null;
            return(false);
        }
Esempio n. 4
0
 public string ToDebugString()
 {
     return(string.Format("{0} {1} (tag {2})", Operation, ObjectId.ToDebugString(), ObjectTag.ToDebugString()));
 }