private void CreateSantaInputComponent() { var santaInput = new InputComponent(santaEnt); ActionDelegate walk_up_down = (entity, dict) => { entity.GetComponent <MovementComponent>().MoveToUp(); }; ActionDelegate walk_down_down = (entity, dict) => { entity.GetComponent <MovementComponent>().MoveToDown(); }; ActionDelegate walk_right_down = (entity, dict) => { entity.GetComponent <MovementComponent>().MoveToRight(); }; ActionDelegate walk_left_down = (entity, dict) => { entity.GetComponent <MovementComponent>().MoveToLeft(); }; ActionDelegate walk_up_up = (entity, dict) => { entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.UP); }; ActionDelegate walk_down_up = (entity, dict) => { entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.DOWN); }; ActionDelegate walk_left_up = (entity, dict) => { entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.LEFT); }; ActionDelegate walk_right_up = (entity, dict) => { entity.GetComponent <MovementComponent>().StopMoveToDirection(MovementComponent.DirectionMovement.RIGHT); }; ActionDelegate debug_hitbox = (entity, dict) => { GraphicManager.DebugHitbox(); }; santaInput.AddAction("walk_up", OnKey.DOWN, Key.Up, null, walk_up_down); // santaInput.AddAction("walk_up", OnKey.UP, Key.Up, null, walk_up_up); santaInput.AddAction("walk_down", OnKey.DOWN, Key.Down, null, walk_down_down); // santaInput.AddAction("walk_down", OnKey.UP, Key.Down, null, walk_down_up); santaInput.AddAction("walk_left", OnKey.DOWN, Key.Left, null, walk_left_down); // santaInput.AddAction("walk_left", OnKey.UP, Key.Left, null, walk_left_up); santaInput.AddAction("walk_right", OnKey.DOWN, Key.Right, null, walk_right_down); // santaInput.AddAction("walk_right", OnKey.UP, Key.Right, null, walk_right_up); santaInput.AddAction("debug_hitbox", OnKey.PRESSED, Key.F1, null, debug_hitbox); santaEnt.AddComponent(santaInput); }