1
Fork 0

Update Steffo scene

This commit is contained in:
Steffo 2019-04-27 17:22:02 +02:00
parent 0abae3b3b7
commit d45ba1290e
7 changed files with 57 additions and 5 deletions

8
Assets/Animations.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ef3d86d84c224344a94715cdfa9fe32c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Animators.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 043f304edcc831c4ea9fcf0e1a2e520d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Assets.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0460346d99d385241a6d87bbd10aceb8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/PhysMats.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e823a56cb429e4b49becdc740fba66b9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -339,5 +339,17 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 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_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cd714ea41cb7c454994bf0f5ad99abd1, type: 3} m_SourcePrefab: {fileID: 100100000, guid: cd714ea41cb7c454994bf0f5ad99abd1, type: 3}

View file

@ -25,24 +25,24 @@ public class Player : MonoBehaviour
{ {
if (Input.GetKey(KeyCode.A)) 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 (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 (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 (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 // Qui c'è da aggiungere la condizione per il controllo degli hp
} }
bool is_valid_movement(string direction) bool CanMoveTo(Vector2Int direction)
{ {
Tile tile; Tile tile;
int posX = (int) transform.position.x; int posX = (int) transform.position.x;

8
Assets/Sounds.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 19c0d85909aede34bb371863f187b9e0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: