Exemplo n.º 1
0
 VisitStatus IPropertyVisitor.VisitProperty <TProperty2, TContainer2, TValue2>(TProperty2 property, ref TContainer2 container, ref ChangeTracker changeTracker)
 {
     if (Result)
     {
         var info = new ContextMemberInfo(
             ContextFieldInfo.Make(property.GetName()),
             ContextTypeInfo.MakeProperty(property)
             );
         Result = Visitor(info);
     }
     return(VisitStatus.Handled);
 }
Exemplo n.º 2
0
 public GameObjectContext(IWatchContext parent, string relativePath, GameObject go, ContextFieldInfo fieldInfo)
     : base(parent
            , relativePath
            , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(GameObjectContext)))
            )
 {
     GO = go;
     this.Variables.Add("Components", new GameObjectComponentDictionary(this, ".Components", go, ContextFieldInfo.Make("Components")));
 }
Exemplo n.º 3
0
 public SceneContext(IWatchContext parent, string relativePath, UnityEngine.SceneManagement.Scene scene, ContextFieldInfo fieldInfo)
     : base(parent
            , relativePath
            , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(SceneContext)))
            )
 {
     Scene = scene;
     Variables.Add("GameObject", new GameObjectDictionary(this, ParserUtils.MakePathRelative("GameObject"), Scene, ContextFieldInfo.Make("GameObject")));
 }
Exemplo n.º 4
0
            VisitStatus IPropertyVisitor.VisitProperty <TProperty2, TContainer2, TValue2>(TProperty2 property, ref TContainer2 container, ref ChangeTracker changeTracker)
            {
                var propName = property.GetName();

                if (propName != PropertyIdentifier)
                {
                    return(VisitStatus.Handled);
                }
                if (Result != null)
                {
                    return(VisitStatus.Handled);
                }
                Result = new PropertyPathContext <TContainer, TValue2>(Parent, Root, ParserUtils.MakePathRelative(PropertyPart), Container, RootPath.Appended(PropertyPart), ContextFieldInfo.Make(PropertyPart));
                return(VisitStatus.Handled);
            }