@rpg-engine/long-bow 0.2.94 → 0.2.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.94",
3
+ "version": "0.2.95",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
package/src/.DS_Store ADDED
Binary file
@@ -24,15 +24,12 @@ export const CharacterSelection: React.FC<ICharacterSelectionProps> = ({
24
24
  availableCharacters,
25
25
  onChange,
26
26
  }) => {
27
- const randomSort = () => 0.5 - Math.random();
28
- const propertySelectValues = availableCharacters
29
- .sort(randomSort)
30
- .map(item => {
31
- return {
32
- id: item.textureKey,
33
- name: item.name,
34
- };
35
- });
27
+ const propertySelectValues = availableCharacters.map(item => {
28
+ return {
29
+ id: item.textureKey,
30
+ name: item.name,
31
+ };
32
+ });
36
33
 
37
34
  const [selectedValue, setSelectedValue] = useState<IPropertiesProps>();
38
35
  const [selectedSpriteKey, setSelectedSpriteKey] = useState('');
@@ -41,8 +38,6 @@ export const CharacterSelection: React.FC<ICharacterSelectionProps> = ({
41
38
  const textureKey = selectedValue ? selectedValue.id : '';
42
39
  const spriteKey = textureKey ? textureKey + '/down/standing/0.png' : '';
43
40
 
44
- console.log(selectedValue);
45
-
46
41
  if (spriteKey === selectedSpriteKey) {
47
42
  return;
48
43
  }
@@ -16,10 +16,10 @@ export function useOutsideClick(ref: any, id: string) {
16
16
  }
17
17
  }
18
18
  // Bind the event listener
19
- document.addEventListener('mousedown', handleClickOutside);
19
+ document.addEventListener('pointerdown', handleClickOutside);
20
20
  return () => {
21
21
  // Unbind the event listener on clean up
22
- document.removeEventListener('mousedown', handleClickOutside);
22
+ document.removeEventListener('pointerdown', handleClickOutside);
23
23
  };
24
24
  }, [ref]);
25
25
  }
Binary file
Binary file