Ejemplo n.º 1
0
    void PickPattern()
    {
        int        index = Random.Range((int)SPAWN_MODE.SPAWN_IN_A_ROW, (int)SPAWN_MODE.SPAWN_IN_A_ROW);
        SPAWN_MODE mode  = (SPAWN_MODE)index;

        SetPattern(mode);
    }
Ejemplo n.º 2
0
    public void SetPattern(SPAWN_MODE mode)
    {
        if (AppManager.gameManager.bonusModeController.isBonusModeActive)
        {
            return;
        }

        currentSpawnMode = mode;
        switch (mode)
        {
        case SPAWN_MODE.SPAWN_RANDOMLY:
            SpawnRandomly();
            break;

        case SPAWN_MODE.SPAWN_IN_A_ROW:
            SpawnInARow();
            break;
        }
    }
Ejemplo n.º 3
0
    //void OnValidate()
    //{
    //    dropTable.ValidateTable();
    //}

    void Setup()
    {
        dropTable.ValidateTable();
        LevelManager.Instance.OnReachedNextlevel += OnReachedNextlevel;

        //if (GameObject.FindGameObjectWithTag("SpawnPoint") != null)
        //{
        //    GameObject temp = GameObject.FindGameObjectWithTag("SpawnPoint");
        //    spawner = temp.GetComponent<Spawner>();
        //}

        //if (GameObject.FindGameObjectWithTag("CoinSpawner") != null)
        //{
        //    GameObject temp = GameObject.FindGameObjectWithTag("CoinSpawner");
        //    coinSpawner = temp.GetComponent<CoinSpawner>();
        //}
        //if (GameObject.FindGameObjectWithTag("PowerupSpawner") != null)
        //{
        //    GameObject temp = GameObject.FindGameObjectWithTag("PowerupSpawner");
        //    powerupSpawner = temp.GetComponent<PowerupSpawner>();
        //}
        currentSpawnMode = SPAWN_MODE.DEFAULT;
    }