- Home /
Display remaining knives UI ? (knife hit style)
i made a progress in a game , its about a player throwing knives to pass the level , so i want to display how many knives left like knife hit game , but , ive seen a tutorial and did as the tutorial stated but nothing happened so i need to make my own and don't want to start from scratch since i made big progress in my game , so how can add such thing in my game ? see picture , and heres a sample code where knives are spawned :` IEnumerator Release() { yield return new WaitForSeconds(RleaseTime); GetComponent().enabled = false; this.enabled = false;
yield return new WaitForSeconds(2f);
if (nextshuriken != null && GameObject.FindWithTag("balloon") != null)
{
Destroy(gameObject);
nextshuriken.SetActive(true);
}
else if (nextshuriken != null && GameObject.FindWithTag("balloon") == null)
{
NextLevel();
// SceneManager.LoadScene("level01", LoadSceneMode.Single);
// SceneManager.LoadScene("level01");
}
else if (nextshuriken == null && GameObject.FindWithTag("balloon") == null)
{
NextLevel();
// SceneManager.LoadScene("level01", LoadSceneMode.Single);
// SceneManager.LoadScene("level01");
}
else
{
yield return new WaitForSeconds(1f);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
Debug.Log("Try Again !");
}
}`
Your answer
Follow this Question
Related Questions
How do I set a Panel Active after a video finish playing 0 Answers
ui panel disappears after showing for few seconds ?(problem) 1 Answer
Cannot interact with image? 0 Answers
UI - clamp the movement of a panel 0 Answers
Display an Image by Z Axis 1 Answer