Exemple #1
0
        protected override void DoExecute(IContext context)
        {
            var behaviour = context.GetBehaviour();
            var format    = m_Format.Get(context);
            var objects   = m_Args.LoadObjects(context);

            switch (m_Severity)
            {
            case Severity.Info:
                Debug.LogFormat(behaviour, format, objects);
                break;

            case Severity.Warning:
                Debug.LogWarningFormat(behaviour, format, objects);
                break;

            case Severity.Error:
                Debug.LogErrorFormat(behaviour, format, objects);
                break;

            case Severity.Assert:
                Debug.LogAssertionFormat(behaviour, format, objects);
                break;

            default:
                Debug.LogAssertion($"Unknown Severity {m_Severity}");
                break;
            }

            m_Args.ReleaseObjects(context);
        }
Exemple #2
0
        protected override void Execute(IContext context, UnityEngine.UI.Text text)
        {
            var format  = m_Format.Get(context);
            var objects = m_Args.LoadObjects(context);

            text.text = string.Format(format, objects);

            m_Args.ReleaseObjects(context);
        }
Exemple #3
0
        protected override string Evaluate(IContext context)
        {
            var format  = m_Format.Get(context);
            var objects = m_Args.LoadObjects(context);

            var result = string.Format(format, objects);

            m_Args.ReleaseObjects(context);
            return(result);
        }
Exemple #4
0
        protected override string Evaluate(IContext context)
        {
            var a = m_Target.Load(context);
            var b = m_Value.Get(context);

            switch (m_Operator)
            {
            case Operator.Assign: return(b);

            case Operator.Append: return(a + b);

            default:
                Debug.LogAssertion($"Unkown Operator {m_Operator}");
                return(default);
            }
        }
Exemple #5
0
        protected override bool DoEvaluate(IContext context)
        {
            var a = m_A.Get(context);
            var b = m_B.Get(context);

            switch (m_Operator)
            {
            case Operator.Equals: return(a.Equals(b));

            case Operator.Contains: return(a.Contains(b));

            case Operator.StartsWith: return(a.StartsWith(b));

            case Operator.EndsWith: return(a.EndsWith(b));

            default:
                Debug.LogAssertion($"Unknown Operator {m_Operator}");
                return(false);
            }
        }
        protected sealed override void Execute(IContext context, Animator animator)
        {
            var parameter = m_Parameter.Get(context);

            ExecuteParameter(context, animator, parameter);
        }