public override void Visit(EntityScopeData inScope, TableLineRef inSourceRef) { base.Visit(inScope, inSourceRef); switch (inScope.Type) { case EntityScopeType.ObjectsWithName: { if (Match(inScope.SearchArg)) { AddRef(inSourceRef, "Entity Name Search: " + inScope.SearchArg); } break; } case EntityScopeType.ObjectsWithPrefab: { if (Match(inScope.SearchArg)) { AddRef(inSourceRef, "Entity Prefab Name Search " + inScope.SearchArg); } break; } } if (Match(inScope.LinksArg)) { AddRef(inSourceRef, "Entity Link: " + inScope.LinksArg); } }
public void DefaultInitialize() { Enabled = true; Action = new EntityScopedIdentifier(EntityScopeData.Self(), 0); Arguments = null; }
public override void Visit(EntityScopeData inScope, TableLineRef inSourceRef) { inSourceRef = inSourceRef.WithDescriptor("EntityScopeData"); switch (inScope.Type) { case EntityScopeType.ObjectById: { if (inScope.IdArg == m_EntityId) { AddRef(inSourceRef); } break; } case EntityScopeType.Invalid: { if (m_EntityId == RSEntityId.Invalid) { AddRef(inSourceRef); } break; } case EntityScopeType.Null: { if (m_EntityId == RSEntityId.Null) { AddRef(inSourceRef); } break; } } }
public void DefaultInitialize() { Enabled = true; RSResolvableValueData.SetAsQuery(ref Query, new EntityScopedIdentifier(EntityScopeData.Self(), 0)); Operator = CompareOperator.True; RSResolvableValueData.SetAsValue(ref Target, RSValue.Null); MultiQuerySubset = Subset.All; }
static private RuleFlags GetRuleFlags(EntityScopeData inScopeData, RSLibrary inLibrary) { if (inScopeData.Type == EntityScopeType.ObjectInRegister) { return(RuleFlags.UsesRegisters); } return(0); }
public virtual bool Visit(ref EntityScopedIdentifier ioScopedIdentifier, EntityScopedIdentifier.Type inType) { EntityScopeData scope = ioScopedIdentifier.Scope; if (Visit(ref scope)) { ioScopedIdentifier = new EntityScopedIdentifier(scope, ioScopedIdentifier.Id); return(true); } return(false); }
public override bool Visit(ref EntityScopeData ioScope) { if (ioScope.Type == EntityScopeType.ObjectById) { if (ioScope.IdArg == m_OldId) { // UnityEngine.Debug.LogFormat("Updating entity id from {0} to {1}", m_OldId, m_NewId); ioScope = EntityScopeData.Entity(m_NewId).WithLinks(ioScope.LinksArg, ioScope.UseFirstLink); return(true); } } return(false); }
public virtual bool Visit(ref RSValue ioValue) { if (ioValue.GetInnerType() == RSValue.InnerType.EntityScope) { EntityScopeData scope = ioValue.AsEntity; if (Visit(ref scope)) { ioValue = RSValue.FromEntity(scope); return(true); } } return(false); }
public virtual void Visit(EntityScopeData inScope, TableLineRef inSourceRef) { }
static public RSValue FromEntity(EntityScopeData inScope) { return(new RSValue(inScope)); }
private RSValue(EntityScopeData inScope) : this(InnerType.EntityScope) { EntityValue = inScope; }
void ISerializedObject.Serialize(Serializer ioSerializer) { ioSerializer.Enum("type", ref m_Type, InnerType.Null, FieldOptions.PreferAttribute); switch (m_Type) { case InnerType.Bool: { bool bValue = ioSerializer.IsWriting ? BoolValue : false; ioSerializer.Serialize("value", ref bValue); if (ioSerializer.IsReading) { BoolValue = bValue; } break; } case InnerType.Color: { Color value = ioSerializer.IsWriting ? ColorValue : default(Color); ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { ColorValue = value; } break; } case InnerType.Float: { float value = ioSerializer.IsWriting ? FloatValue : 0; ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { FloatValue = value; } break; } case InnerType.Int32: { int value = ioSerializer.IsWriting ? IntValue : 0; ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { IntValue = value; } break; } case InnerType.String: { string value = ioSerializer.IsWriting ? StringValue : null; ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { StringValue = value; } break; } case InnerType.Vector2: { Vector2 value = ioSerializer.IsWriting ? Vector2Value : default(Vector2); ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { Vector2Value = value; } break; } case InnerType.Vector3: { Vector3 value = ioSerializer.IsWriting ? Vector3Value : default(Vector3); ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { Vector3Value = value; } break; } case InnerType.Vector4: { Vector4 value = ioSerializer.IsWriting ? Vector4Value : default(Vector4); ioSerializer.Serialize("value", ref value); if (ioSerializer.IsReading) { Vector4Value = value; } break; } case InnerType.Enum: { ioSerializer.Serialize("value", ref m_IntValue); ioSerializer.Serialize("enumType", ref m_StringValue); break; } case InnerType.EntityScope: { EntityScopeData value = ioSerializer.IsWriting ? EntityValue : default(EntityScopeData); ioSerializer.Object("value", ref value); if (ioSerializer.IsReading) { EntityValue = value; } break; } case InnerType.GroupId: { RSGroupId value = ioSerializer.IsWriting ? GroupIdValue : default(RSGroupId); ioSerializer.Int32Proxy("value", ref value); if (ioSerializer.IsReading) { GroupIdValue = value; } break; } case InnerType.TriggerId: { RSTriggerId value = ioSerializer.IsWriting ? TriggerIdValue : default(RSTriggerId); ioSerializer.Int32Proxy("value", ref value); if (ioSerializer.IsReading) { TriggerIdValue = value; } break; } } }
public EntityScopedIdentifier(EntityScopeData inScope, int inId) { m_Scope = inScope; m_Id = inId; }
public virtual bool Visit(ref EntityScopeData ioScope) { return(false); }