Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        currentScene     = SceneManager.GetActiveScene();
        level            = playlist.GetLevel(currentScene.name);
        level.buildIndex = currentScene.buildIndex;
        RemoteSettingsHolder rsh = GameObject.FindObjectOfType <RemoteSettingsHolder>();

        if (rsh != null)
        {
            deaths_to_skip = rsh.DeathsToSkip;
            Debug.Log("Deaths To Skip Updated: " + deaths_to_skip);
        }
        if (skip_goal)
        {
            return;
        }
        Key[] keys = GameObject.FindObjectsOfType <Key>();
        level.keys = keys.Length;
        Hazard[] hazards = GameObject.FindObjectsOfType <Hazard>();
        level.hazards = hazards.Length;
        Attacker[] attackers = GameObject.FindObjectsOfType <Attacker>();
        level.attackers = attackers.Length;
        Mover[] movers = GameObject.FindObjectsOfType <Mover>();
        level.moving_hazards = movers.Length;
        foreach (Mover mover in movers)
        {
            level.moving_hazards += mover.objects.Length;
        }
    }