コード例 #1
0
ファイル: SequenceUtils.cs プロジェクト: yqxflong/mh_3drpg
        public static Direction GetLinkDirection(Serialization.Node node, string name)
        {
            if (node.nodeType == NodeType.Variable && (name == Runtime.Variable.ValueLinkName || name == string.Empty))
            {
                return(Direction.InOut);
            }

            string fieldName = FieldName(name);

            VariableAttribute variable = GetVariableAttribute(node.RuntimeType, fieldName);

            if (variable != null)
            {
                return(variable.Direction);
            }

            // test for trigger
            TriggerAttribute trigger = GetTriggerAttribute(node.RuntimeType, fieldName);

            if (trigger != null)
            {
                return(Direction.Out);
            }

            // entry
            EntryAttribute entry = GetEntryAttribute(node.RuntimeType, fieldName);

            if (entry != null)
            {
                return(Direction.In);
            }

            return(Direction.InOut);
        }
コード例 #2
0
ファイル: SequenceUtils.cs プロジェクト: yqxflong/mh_3drpg
        public static string EditorName(string name, System.Type type)
        {
            TriggerAttribute attribute = GetTriggerAttribute(type, name);

            if (attribute != null && string.IsNullOrEmpty(attribute.EditorName) == false)
            {
                return(attribute.EditorName);
            }
            return(NiceName(name));
        }