Esempio n. 1
0
    IEnumerator StartLevelRoutine()
    {
        UIAssistant.main.ShowPage("Loading");

        while (CPanel.uiAnimation > 0)
        {
            yield return(0);
        }

        ProfileAssistant.main.local_profile["life"]--;

        SessionAssistant.main.enabled = false;

        SessionAssistant.Reset();

        yield return(StartCoroutine(CreateField()));

        SessionAssistant.main.enabled = true;
        SessionAssistant.main.eventCount++;

        SessionAssistant.main.StartSession(LevelProfile.main.target, LevelProfile.main.limitation);
        GameCamera.main.transform.position = new Vector3(0, 20, -10);

        yield return(0);
    }
Esempio n. 2
0
    public void  CreateField(Field f)
    {
        RemoveField();

        field = f;


        SessionAssistant.Reset();

        //Generating field;
        GenerateSlots();
        GenerateJelly();
        GenerateBlocks();
        GenerateWalls();
        GenerateChips();
        GeneratePowerups();

        SessionAssistant.main.enabled = true;
        SessionAssistant.main.eventCount++;
    }
Esempio n. 3
0
    // Field generator
    public void  CreateField()
    {
        RemoveField();          // Removing old field

        field           = new Field(LevelProfile.main.width, LevelProfile.main.height);
        field.chipCount = LevelProfile.main.chipCount;

        SessionAssistant.Reset();

        //Generating field;
        GenerateSlots();
        GenerateJelly();
        GenerateBlocks();
        GenerateWalls();
        GenerateChips();
        GeneratePowerups();

        SessionAssistant.main.enabled = true;
        SessionAssistant.main.eventCount++;
    }