Skip to content
Snippets Groups Projects
Commit fb099cdf authored by Akmal Mahardika Nurwahyu Pratama's avatar Akmal Mahardika Nurwahyu Pratama
Browse files

bugfix: frozening time when player shop

player could still moe when shop canvas open, to prevent that, time scale set 0
parent a6d96b6a
2 merge requests!35feat: fix Game Data,!32BUG FIX: Shop, statistic
...@@ -16,6 +16,7 @@ public class Shop : MonoBehaviour ...@@ -16,6 +16,7 @@ public class Shop : MonoBehaviour
public void Interact() public void Interact()
{ {
canvas.enabled = true; canvas.enabled = true;
Time.timeScale = 0;
Debug.Log("Interact shop"); Debug.Log("Interact shop");
} }
...@@ -25,6 +26,7 @@ public class Shop : MonoBehaviour ...@@ -25,6 +26,7 @@ public class Shop : MonoBehaviour
// if (Input.GetKeyDown(KeyCode.Escape) || (shop != null && !shop.activeSelf)) // if (Input.GetKeyDown(KeyCode.Escape) || (shop != null && !shop.activeSelf))
{ {
canvas.enabled = false; canvas.enabled = false;
Time.timeScale = 1;
} }
} }
} }
...@@ -28,6 +28,7 @@ public class ShopManager : MonoBehaviour ...@@ -28,6 +28,7 @@ public class ShopManager : MonoBehaviour
public void CloseCanvas() public void CloseCanvas()
{ {
canvas.enabled = false; canvas.enabled = false;
Time.timeScale = 1;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment