Beispiel #1
0
        public static BaseComponent LoadFromDefinition(ContentManager content, string definitionPath, BaseEntity parent)
        {
            ConstantMovementComponentDefinition compDef = content.Load <ConstantMovementComponentDefinition>(definitionPath);

            ConstantMovementComponent newComponent = new ConstantMovementComponent(parent, compDef);

            return(newComponent);
        }
Beispiel #2
0
        public ConstantMovementComponent(BaseEntity parent, ConstantMovementComponentDefinition compDef)
            : base(parent)
        {
            ActivateComponent();

            this.MovementVector = compDef.MovementVector;
            this.Frequency      = compDef.Frequency;
            this.Amplitude      = compDef.Amplitude;
        }