Reworked controls and fixed equipment generation with Place = Bag

This commit is contained in:
Finnchen123 2025-06-07 12:09:07 +02:00
parent faebc757f6
commit dd1b3db417
6 changed files with 54 additions and 17 deletions

View File

@ -7348,13 +7348,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 389433792} m_GameObject: {fileID: 389433792}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 24840619} - {fileID: 24840619}
m_Father: {fileID: 718596642} m_Father: {fileID: 925710720}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.4, y: 0.15} m_AnchorMin: {x: 0.4, y: 0.15}
m_AnchorMax: {x: 0.6, y: 0.25} m_AnchorMax: {x: 0.6, y: 0.25}
@ -12253,13 +12253,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 653632097} m_GameObject: {fileID: 653632097}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1156480095} - {fileID: 1156480095}
m_Father: {fileID: 718596642} m_Father: {fileID: 925710720}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.35, y: 0.35} m_AnchorMin: {x: 0.35, y: 0.35}
m_AnchorMax: {x: 0.65, y: 0.6} m_AnchorMax: {x: 0.65, y: 0.6}
@ -13798,10 +13798,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1695792616} - {fileID: 925710720}
- {fileID: 2025004928}
- {fileID: 653632098}
- {fileID: 389433793}
m_Father: {fileID: 1456932137} m_Father: {fileID: 1456932137}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@ -18779,6 +18776,45 @@ MonoBehaviour:
references: references:
version: 2 version: 2
RefIds: [] RefIds: []
--- !u!1 &925710719
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 925710720}
m_Layer: 5
m_Name: Tutorial_Main
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &925710720
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 925710719}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1695792616}
- {fileID: 2025004928}
- {fileID: 653632098}
- {fileID: 389433793}
m_Father: {fileID: 718596642}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &926355124 --- !u!1 &926355124
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -29952,7 +29988,7 @@ RectTransform:
- {fileID: 445308058} - {fileID: 445308058}
m_Father: {fileID: 1456932137} m_Father: {fileID: 1456932137}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.875, y: 0.775} m_AnchorMin: {x: 0.9, y: 0.8}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
@ -33676,13 +33712,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1695792615} m_GameObject: {fileID: 1695792615}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1031718409} - {fileID: 1031718409}
m_Father: {fileID: 718596642} m_Father: {fileID: 925710720}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.65, y: 0.76500005} m_AnchorMin: {x: 0.65, y: 0.76500005}
m_AnchorMax: {x: 0.8, y: 1} m_AnchorMax: {x: 0.8, y: 1}
@ -39398,13 +39434,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2025004927} m_GameObject: {fileID: 2025004927}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1502355731} - {fileID: 1502355731}
m_Father: {fileID: 718596642} m_Father: {fileID: 925710720}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.2, y: 0.75} m_AnchorMin: {x: 0.2, y: 0.75}
m_AnchorMax: {x: 0.35, y: 1} m_AnchorMax: {x: 0.35, y: 1}

View File

@ -74,6 +74,7 @@ public class Controls : MonoBehaviour
public void FixedUpdate() public void FixedUpdate()
{ {
Debug.Log(playerInput.currentControlScheme);
if (direction != MoveDirection.None) if (direction != MoveDirection.None)
{ {
AxisEventData data = new AxisEventData(EventSystem.current); AxisEventData data = new AxisEventData(EventSystem.current);

View File

@ -190,6 +190,7 @@ namespace Assets.Scripts
if (state == UIState.PAUSE) if (state == UIState.PAUSE)
{ {
closePauseMenu(); closePauseMenu();
Cursor.lockState = CursorLockMode.Locked;
} }
else else
{ {

View File

@ -29,7 +29,7 @@ namespace Assets.Scripts
numberOfAttributes = 0; numberOfAttributes = 0;
} }
calculateAttributes(luck, numberOfAttributes); calculateAttributes(luck, numberOfAttributes);
place = (ItemPlace)rand.Next(8); place = (ItemPlace)rand.Next(7);
editName(); editName();
loadImage(); loadImage();
} }

View File

@ -183,7 +183,6 @@ namespace Assets.Scripts.Player
} }
public void rotate(Vector2 input, Vector2 speed){ public void rotate(Vector2 input, Vector2 speed){
Debug.Log(input.x * speed.x);
transform.Rotate(Vector3.up, input.x * speed.x * 5);// * Time.deltaTime); transform.Rotate(Vector3.up, input.x * speed.x * 5);// * Time.deltaTime);
} }

View File

@ -18,7 +18,7 @@
"isDodging": "False", "isDodging": "False",
"killcount": 0, "killcount": 0,
"treecount": 0, "treecount": 0,
"orecount": 1, "orecount": 0,
"luck": 20, "luck": 20,
"difficulty": 0 "difficulty": 0
}, },
@ -52,7 +52,7 @@
"slot0": { "slot0": {
"bag1": { "bag1": {
"rarity": "COMMON", "rarity": "COMMON",
"itemName": "Tin ore", "itemName": "Rock",
}, },
"bag2": "empty", "bag2": "empty",