diff --git a/Assets/Animations.meta b/Assets/Animations.meta new file mode 100644 index 0000000..b2a79e2 --- /dev/null +++ b/Assets/Animations.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef3d86d84c224344a94715cdfa9fe32c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animators.meta b/Assets/Animators.meta new file mode 100644 index 0000000..7ff80b8 --- /dev/null +++ b/Assets/Animators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 043f304edcc831c4ea9fcf0e1a2e520d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Assets.meta b/Assets/Assets.meta new file mode 100644 index 0000000..4eba494 --- /dev/null +++ b/Assets/Assets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0460346d99d385241a6d87bbd10aceb8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PhysMats.meta b/Assets/PhysMats.meta new file mode 100644 index 0000000..bc5b1b2 --- /dev/null +++ b/Assets/PhysMats.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e823a56cb429e4b49becdc740fba66b9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Steffo.unity b/Assets/Scenes/Steffo.unity index 3b2ac89..d68be2b 100644 --- a/Assets/Scenes/Steffo.unity +++ b/Assets/Scenes/Steffo.unity @@ -339,5 +339,17 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 6907631410461015020, guid: cd714ea41cb7c454994bf0f5ad99abd1, + type: 3} + propertyPath: wallSprite + value: + objectReference: {fileID: 21300000, guid: 0121970e693ee0a4d987bd5fe694ad67, + type: 3} + - target: {fileID: 6907631410461015020, guid: cd714ea41cb7c454994bf0f5ad99abd1, + type: 3} + propertyPath: corridorSprite + value: + objectReference: {fileID: 21300000, guid: f5be5362b22aa6c48993a720ec6c9b84, + type: 3} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: cd714ea41cb7c454994bf0f5ad99abd1, type: 3} diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index 96900b0..cfef994 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -25,24 +25,24 @@ public class Player : MonoBehaviour { if (Input.GetKey(KeyCode.A)) { - if (is_valid_movement("left")) transform.Translate(Vector3.left); + if (CanMoveTo("left")) transform.Translate(Vector3.left); } if (Input.GetKey(KeyCode.D)) { - if (is_valid_movement("right")) transform.Translate(Vector3.right); + if (CanMoveTo("right")) transform.Translate(Vector3.right); } if (Input.GetKey(KeyCode.W)) { - if (is_valid_movement("up")) transform.Translate(Vector3.up); + if (CanMoveTo("up")) transform.Translate(Vector3.up); } if (Input.GetKey(KeyCode.S)) { - if (is_valid_movement("down")) transform.Translate(Vector3.down); + if (CanMoveTo("down")) transform.Translate(Vector3.down); } // Qui c'รจ da aggiungere la condizione per il controllo degli hp } - bool is_valid_movement(string direction) + bool CanMoveTo(Vector2Int direction) { Tile tile; int posX = (int) transform.position.x; diff --git a/Assets/Sounds.meta b/Assets/Sounds.meta new file mode 100644 index 0000000..5fd147f --- /dev/null +++ b/Assets/Sounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 19c0d85909aede34bb371863f187b9e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: