Exemplo n.º 1
0
    public void LevelCheck(LevelResults results, LevelGoal goal, int buildingBlock, LevelTopic topic)
    {
        print("Requested Level check from " + topic.ToString() + ": " + results.ToString() + ", " + goal.ToString() + ", " + buildingBlock.ToString());
        if ((results == LevelResults.Win && goal == LevelGoal.Win) ||
            (results == LevelResults.Fail && goal == LevelGoal.Fail) ||
            (results == LevelResults.Skip && goal == LevelGoal.Skip))
        {
            floors[nextfloor] = buildingBlock;

            /*print("House upgraded: "+ floors[0].ToString() + floors[1].ToString() + floors[2].ToString() + floors[3].ToString()
             + floors[4].ToString() + floors[5].ToString() + floors[6].ToString() + floors[7].ToString() + floors[8].ToString());*/
            nextfloor++;
        }
        completion[(int)topic] = true;
        print("Levels completed: " + completion[0].ToString() + completion[1].ToString() + completion[2].ToString()
              + completion[3].ToString() + completion[4].ToString() + completion[5].ToString() + completion[6].ToString()
              + completion[7].ToString() + completion[8].ToString());
    }