Пример #1
0
        public EntityDefinition Create(string entityName, List <EntityBehaviourType> requiredBehaviourTypes)
        {
            EntityDefinition definition = new EntityDefinition(entityName);

            for (int i = 0; i < requiredBehaviourTypes.Count; i++)
            {
                definition.requiredBehaviourTypes.Add(requiredBehaviourTypes[i]);
                EntityBehaviourDefinition def = AddBehaviourToEntityDefinition(definition, requiredBehaviourTypes[i]);
            }
            return(definition);
        }
Пример #2
0
        public override void Load(EntityDefinition load)
        {
            contentName = load.contentName;
            for (int i = 0; i < load.requiredBehaviours.Count; i++)
            {
                EntityBehaviourDefinition behaviourRequired = load.requiredBehaviours[i];
                for (int j = 0; j < requiredBehaviours.Count; j++)
                {
                    EntityBehaviourDefinition existingBehaviour = requiredBehaviours[j];
                    if (behaviourRequired.behaviourType == existingBehaviour.behaviourType)
                    {
                        existingBehaviour.Load(behaviourRequired);
                        break;
                    }
                }

                // create the behaviour
                EntityDefinitionBuilder   builder            = new EntityDefinitionBuilder();
                EntityBehaviourDefinition behaviourDefintion = builder.AddBehaviourToEntityDefinition(this, behaviourRequired.behaviourType);
                behaviourDefintion.Load(behaviourRequired);
            }
        }
 public override void ConfigureFromDefinition(EntityBehaviourDefinition definition)
 {
 }
 public abstract void ConfigureFromDefinition(EntityBehaviourDefinition definition);
 public override void Load(EntityBehaviourDefinition load)
 {
 }
Пример #6
0
 public abstract void Load(EntityBehaviourDefinition load);