예제 #1
0
        public static TimelineAction GetCurrentTimelineAction(this Project project)
        {
            GameProjectContent projectContent = project.GetProjectContent();

            if (projectContent != null)
            {
                return(projectContent.TimelineAction);
            }
            return((TimelineAction)null);
        }
예제 #2
0
        public static NodeObject GetRootNode(this Project project)
        {
            GameProjectContent projectContent = project.GetProjectContent();

            if (projectContent != null)
            {
                return(projectContent.RootVisualObject as NodeObject);
            }
            return((NodeObject)null);
        }
예제 #3
0
        public static TimelineAction GetCurrentTimelineAction(this Project project)
        {
            GameProjectContent projectContent = project.GetProjectContent();
            TimelineAction     result;

            if (projectContent != null)
            {
                result = projectContent.TimelineAction;
            }
            else
            {
                result = null;
            }
            return(result);
        }
예제 #4
0
        public static NodeObject GetRootNode(this Project project)
        {
            GameProjectContent projectContent = project.GetProjectContent();
            NodeObject         result;

            if (projectContent != null)
            {
                result = (projectContent.RootVisualObject as NodeObject);
            }
            else
            {
                result = null;
            }
            return(result);
        }
예제 #5
0
        public static int GetTypeIndex(this Project project, Type objectType)
        {
            GameProjectContent projectContent = project.GetProjectContent();

            if (projectContent == null)
            {
                return(0);
            }
            if (projectContent.TypeIndex.ContainsKey(objectType))
            {
                Dictionary <Type, int> typeIndex;
                Type index;
                (typeIndex = projectContent.TypeIndex)[index = objectType] = typeIndex[index] + 1;
            }
            else
            {
                projectContent.TypeIndex.Add(objectType, 1);
            }
            return(projectContent.TypeIndex[objectType]);
        }
예제 #6
0
        public static int GetTypeIndex(this Project project, Type objectType)
        {
            GameProjectContent projectContent = project.GetProjectContent();
            int result;

            if (projectContent != null)
            {
                if (projectContent.TypeIndex.ContainsKey(objectType))
                {
                    Dictionary <Type, int> typeIndex;
                    (typeIndex = projectContent.TypeIndex)[objectType] = typeIndex[objectType] + 1;
                }
                else
                {
                    projectContent.TypeIndex.Add(objectType, 1);
                }
                result = projectContent.TypeIndex[objectType];
            }
            else
            {
                result = 0;
            }
            return(result);
        }