Beispiel #1
0
    //DEBUG XML LOADER BAD
    public IEnumerator LoadDebugXML(string xmlName)
    {
        //Root is project root-root (assets/ cd ../../)
        //This is just a debug thing for JEremy, calling this shall be REMOVED from a final version.
        print(" LOADING XML, THSI SHOULD NOT BE HAPPENING IN THE FINAL VERSION");
        WWW www;

        if (Application.isWebPlayer)
        {
            www = new WWW(Application.dataPath + @"/" + xmlName);
        }
        else
        {
            www = new WWW("file://" + xmlName);
        }

        yield return(www);

        DifficultyLevelEntry debugDifficulty = XmlSupport.DeserializeXml <DifficultyLevelEntry>(www.text);

        difficultyLevels[0] = debugDifficulty;
        SetDifficultyLevel(difficultyLevels[0]);
        StopCoroutine("DelayedAddingOfCustomers");

        StartCoroutine("DelayedAddingOfCustomers");

        string text = www.text;
    }
Beispiel #2
0
 public void SetDifficultyLevel(DifficultyLevelEntry level)
 {
     if (currentDifficultyLevel > 4)
     {
         currentDifficultyLevel = 4;
     }
     difficultyLevelSprite.spriteName = "icons_LEVEL_" + (currentDifficultyLevel + 1).ToString();
     customerSpawnMinMax = new float[2] {
         level.minSpawnTime, level.maxSpawnTime
     };
     daytimeTotal     = level.durationOfDay;
     daytimeRemaining = daytimeTotal;
 }
Beispiel #3
0
 public void SetDifficultyLevel(DifficultyLevelEntry level)
 {
     if (currentDifficultyLevel > 4) currentDifficultyLevel = 4;
     difficultyLevelSprite.spriteName = "icons_LEVEL_" + (currentDifficultyLevel + 1).ToString();
     customerSpawnMinMax=  new float[2] {level.minSpawnTime, level.maxSpawnTime };
     daytimeTotal = level.durationOfDay;
     daytimeRemaining = daytimeTotal;
 }