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

            CharacterInputComponent newComponent = new CharacterInputComponent(parent, compDef);

            return(newComponent);
        }
示例#2
0
        public CharacterInputComponent(BaseEntity parent, CharacterInputComponentDefinition compDef)
            : base(parent)
        {
            this.movementSpeed = compDef.MovementSpeed;
            this.rotationSpeed = compDef.RotationSpeed;

            this.LeftThumbStickModifier  = compDef.LeftThumbStickModifier;
            this.RightThumbStickModifier = compDef.RightThumbStickModifier;
        }