Ejemplo n.º 1
0
    // Set the text
    public void Start()
    {
        // Get a reference to the text component.
        m_TextComponent = GetComponent <TMP_Text>();

        // Get the statistics object that counts the numbers of infected/dead etc players
        levelStats = LevelStats.GetActiveLevelStats();

        // the number in the text is set by the level stats
        m_TextComponent.text = levelStats.GetInfected().ToString();
    }
Ejemplo n.º 2
0
    public void Start()
    {
        LevelSettings = LevelSettings.GetActiveLevelSettings();

        // Get the statistics object that counts the number of infected humans
        // and initialize it.
        levelStats = LevelStats.GetActiveLevelStats();
        // Reset the level stats if it was active.
        // This is necessary if we restart from a previous run.
        levelStats.Reset();
    }
Ejemplo n.º 3
0
    // Set the text
    public void Start()
    {
        // Get a reference to the text component.
        m_TextComponent = GetComponent <TMP_Text>();

        // Get the statistics object that counts the numbers of infected/dead etc players
        levelStats = LevelStats.GetActiveLevelStats();

        // We count the exposed and infected as one, since humans get first exposed
        // and then infected, we print the exposed only
        // the number in the text is set by the level stats
        m_TextComponent.text = levelStats.GetExposed().ToString();
    }
Ejemplo n.º 4
0
 /// <summary>
 /// Start is called on the frame when a script is enabled just before any of the Update methods are called the first time.
 /// </summary>
 public virtual void Start()
 {
     // Get the statistics object that counts the numbers of infected/dead etc players
     levelStats = LevelStats.GetActiveLevelStats();
     // We want to change smiley's images and do not want use GetComponent again
     // and again in the corresponding function
     mySpriteRenderer = GetComponent <SpriteRenderer>();
     myRigidbody      = GetComponent <Rigidbody2D>();
     // The player and npc class set their corresponding sprite images
     SetSpriteImages();
     // _initialCondition may have been modified by base classes
     // this becomes _mycondition during Start()
     SetCondition(_initialCondition);
 }
Ejemplo n.º 5
0
    public void StartCampaign()
    {
        // Play Now Button has been pressed, here you can initialize your game
        // Get the statistics object that counts the number of infected humans
        // and initialize it.
        LevelStats levelStats = LevelStats.GetActiveLevelStats();

        // Reset the level stats if it was active.
        // This is necessary if we restart from a previous run.
        levelStats.Reset();
        // Initialize the level stats.
        levelStats.Init(LevelSettings.NumberOfNPCs);

        // Load the Scene for levelgethome
        UnityEngine.SceneManagement.SceneManager.LoadScene("StartScreenLevelgethome");
    }