Skip to content
Snippets Groups Projects

feat: show shop temporary only

Merged Malik Rafsanjani requested to merge malik/fix/shop-show-exit-quest into master
Compare and
2 files
+ 37
3
Preferences
Compare changes
Files
2
@@ -55,10 +55,24 @@ public class Temple : MonoBehaviour
}
}
private GameObject shop;
public GameObject Shop
{
get
{
if (shop == null)
{
shop = GameObject.Find("Environment/stall_001");
}
return shop;
}
}
// Start is called before the first frame update
void Start()
{
Shop.SetActive(false);
}
// Update is called once per frame
@@ -83,8 +97,17 @@ public class Temple : MonoBehaviour
timer.StartTimer();
}
private IEnumerator ShowShop()
{
Shop.SetActive(true);
yield return new WaitForSeconds(30f);
Shop.SetActive(false);
}
private void ExitingQuest()
{
StartCoroutine(ShowShop());
var reward = questNumberEnemy.Reward;
GameControl.control.addCurrency(reward);
timer.StopTimer();