public WorldDictionary(IWatchContext parent, string relativePath, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(WorldDictionary))) ) { }
public GameObjectComponentDictionary(IWatchContext parent, string relativePath, GameObject go, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(GameObjectContext))) ) { GO = go; }
public GameObjectDictionary(IWatchContext parent, string relativePath, UnityEngine.SceneManagement.Scene scene, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(GameObjectDictionary))) ) { Scene = scene; }
public EntityDictionary(IWatchContext parent, string relativePath, Entities.World world, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(EntityDictionary))) ) { World = world; }
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"))); }
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"))); }
public EntityContext(IWatchContext parent, string relativePath, Entity entity, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(WorldContext))) ) { this.entity = entity; //Variables.Add("Components", new EntityDictionary(this, ".Entity", World, ContextFieldInfo.Make("Entity"))); }
// propPath public PropertyPathContext(IWatchContext parent, IWatchContext rootPathContext, string relativePath, TContainer container, PropertyPath propPath, ContextFieldInfo fieldInfo) : base(parent , relativePath , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(TPropertyType))) ) { Container = container; PropPath = propPath; RootPathContext = rootPathContext; }
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); }
public override bool VisitAllMembers(Func <ContextMemberInfo, bool> visitor) { var comps = GO.GetComponents <Component>(); for (int i = 0; i != comps.Length; ++i) { var info = new ContextMemberInfo( ContextFieldInfo.MakeOperator($"[{i}]"), ContextTypeInfo.Make(comps[i].GetType()) ); if (!visitor(info)) { return(false); } } return(true); }
protected ContextMemberInfo MakeMemberInfo <TMemberType>(string index) { return(new ContextMemberInfo(ContextFieldInfo.MakeOperator($"[{index}]"), ContextTypeInfo.Make(typeof(TMemberType)))); }
public override bool VisitAllMembers(Func <ContextMemberInfo, bool> visitor) { foreach (var e in World.EntityManager.GetAllEntities()) { var info = new ContextMemberInfo(ContextFieldInfo.MakeOperator($"[{e.Index}]"), ContextTypeInfo.Make(typeof(PropertyPathContext <EntityContainer, EntityContainer>))); if (!visitor(info)) { return(false); } } return(true); }