diff --git a/Assets/DevMocks.meta b/Assets/Scripts/src/Interfaces.meta similarity index 77% rename from Assets/DevMocks.meta rename to Assets/Scripts/src/Interfaces.meta index 70e5188..e041cf7 100644 --- a/Assets/DevMocks.meta +++ b/Assets/Scripts/src/Interfaces.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dab5da68831f44f63b7b6ba9f49a4d17 +guid: 55804228f3fc40ad8c5e0992ea925b1c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/src/Player/PlayerController.cs b/Assets/Scripts/src/Player/PlayerController.cs index 30d219b..9d59b1c 100644 --- a/Assets/Scripts/src/Player/PlayerController.cs +++ b/Assets/Scripts/src/Player/PlayerController.cs @@ -11,15 +11,10 @@ namespace src.Player public GameObject bombPrefab; - Transform playerTransform; - - //O sa fie mai tarziu folosita cand o sa avem numar de bombe allowed - bool canPlaceBombs = true; - protected new void Start() { base.Start(); - + /* Always start at the starting point. */ Respawn(); } @@ -49,7 +44,6 @@ namespace src.Player var movementVector = new Vector2(horizontal, vertical); Rigidbody2d.position += movementSpeed * Time.deltaTime * movementVector; - playerTransform.position = movementVector; #elif UNITY_IOS || UNITY_ANDROID // Phone movement is not supported yet. #elif UNITY_PS4 || UNITY_XBOXONE @@ -59,15 +53,15 @@ namespace src.Player private void PlaceBomb() { - Instantiate(bombPrefab, new Vector3(Mathf.RoundToInt(playerTransform.position.x), - bombPrefab.transform.position.y, Mathf.RoundToInt(playerTransform.position.z)), - bombPrefab.transform.rotation); + Instantiate(bombPrefab, new Vector3(Mathf.RoundToInt(transform.position.x), + bombPrefab.transform.position.y, 0f), + bombPrefab.transform.rotation); } private void HandleBomb() { #if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBGL - if (canPlaceBombs && Input.GetKeyDown(KeyCode.Space)) + if (Input.GetKeyDown(KeyCode.Space)) { PlaceBomb(); }