public static BaseComponent LoadFromDefinition(ContentManager content, string definitionPath, BaseEntity parent) { CharacterInputComponentDefinition compDef = content.Load <CharacterInputComponentDefinition>(definitionPath); CharacterInputComponent newComponent = new CharacterInputComponent(parent, compDef); return(newComponent); }
public CharacterInputComponent(BaseEntity parent, CharacterInputComponentDefinition compDef) : base(parent) { this.movementSpeed = compDef.MovementSpeed; this.rotationSpeed = compDef.RotationSpeed; this.LeftThumbStickModifier = compDef.LeftThumbStickModifier; this.RightThumbStickModifier = compDef.RightThumbStickModifier; }