Hi! first of all, i am newbie with this… i would like to know how can i keep an text showing up, after i picked up an item, on the screen even when i reset the level of the game - it’s a rogue like game.
this is the code im using:
using UnityEngine;
using System.Collections;
using UnityEngine.UI; //Allows us to use UI.
using UnityEngine.SceneManagement;
namespace Completed
{
//Player inherits from MovingObject, our base class for objects that can move, Enemy also inherits from this.
public class Player : MovingObject
{
public float restartLevelDelay = 1f; //Delay time in seconds to restart level.
public int pointsPerFood = 10; //Number of points to add to player food points when picking up a food object.
public int pointsPerSoda = 20; //Number of points to add to player food points when picking up a soda object.
public int pointsPerEsfera = 1;
public int wallDamage = 1; //How much damage a player does to a wall when chopping it.
public Text foodText; //UI Text to display current player food total.
public Text countText;
public Text winText;
public Text win1Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win2Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win3Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win4Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win5Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win6Text; ------ this 7 texts i want to keep showing up after the level reset
public Text win7Text; ------ this 7 texts i want to keep showing up after the level reset
public AudioClip moveSound1; //1 of 2 Audio clips to play when player moves.
public AudioClip moveSound2; //2 of 2 Audio clips to play when player moves.
public AudioClip eatSound1; //1 of 2 Audio clips to play when player collects a food object.
public AudioClip eatSound2; //2 of 2 Audio clips to play when player collects a food object.
public AudioClip drinkSound1; //1 of 2 Audio clips to play when player collects a soda object.
public AudioClip drinkSound2; //2 of 2 Audio clips to play when player collects a soda object.
public AudioClip gameOverSound; //Audio clip to play when player dies.
public AudioClip pokeSound;
[SerializeField] Image showImage;
int maxEsfera = 7;