예제 #1
0
    // Use this for initialization
    public void Start()
    {
        //initially putting the max dimensions i.e.10
        width = height = maxWidth = maxWidth;

        //width= Random.Range(minWidth, maxWidth+1);
        //	height=Random.Range(minHeight, maxHeight+1);

        // initialising 2D array
        m_allTiles = new Tile[maxWidth, maxHeight];

        //intialising array
        m_allGamePieces = new GamePiece[maxWidth, maxHeight];

        // to run the setup tile method
        SetupTiles();

        //to setup the camera properly
        SetupCamera();

        //to fill the board with random dots
        FillRandom();

        //to assign boardshuffling
        m_boardShuffler = GetComponent <BoardShuffler>();
    }
예제 #2
0
 private void Start()
 {
     _allTiles       = new Tile[_width, _height];
     _allGamePieces  = new GamePiece[_width, _height];
     _particlManager = GameObject.FindGameObjectWithTag("ParticleManager").GetComponent <ParticleManager>();
     _boardDeadlock  = GetComponent <BoardDeadlock>();
     _boardShuffler  = GetComponent <BoardShuffler>();
 }
예제 #3
0
 void Start()
 {
     m_allTiles        = new Tile[width, height];
     m_allGamePieces   = new GamePiece[width, height];
     m_particleManager = GameObject.FindWithTag("ParticleManager").GetComponent <ParticleManager>();
     m_boardDeadlock   = GetComponent <BoardDeadlock>();
     m_boardShuffler   = GetComponent <BoardShuffler>();
 }
예제 #4
0
 private void Start()
 {
     tileArray         = new Tile[width, height];
     gamePiecesArray   = new GamePiece[width, height];
     m_particleManager = GameObject.FindWithTag("ParticleManager").GetComponent <ParticleManager>();
     m_boardDeadlock   = GetComponent <BoardDeadLock>();
     m_boardShuffler   = GetComponent <BoardShuffler>();
 }
예제 #5
0
    //this is for reducing the width size
    public void SlideChange(float someValue)
    {
        if (width > someValue)
        {
            width = (int)someValue;

            ShuffleBoard();

            GameObject[] destroyingItems = GameObject.FindGameObjectsWithTag("Respawn");
            foreach (GameObject destoryingItem in destroyingItems)
            {
                GameObject.Destroy(destoryingItem);
                //destoryingItem.transform.position=new Vector3(-100,-100,-10f);
            }

            // initialising 2D array
            m_allTiles = new Tile[width, height];

            //intialising array
            m_allGamePieces = new GamePiece[width, height];

            // to run the setup tile method
            SetupTiles();

            //to setup the camera properly
            SetupCamera();

            //to fill the board with random dots
            FillRandom();
        }
        else
        {
            GameObject[] destroyingItems = GameObject.FindGameObjectsWithTag("Respawn");
            foreach (GameObject destoryingItem in destroyingItems)
            {
                GameObject.Destroy(destoryingItem);
                //destoryingItem.transform.position=new Vector3(-100,-100,-10f);
            }
            width = (int)someValue;
            // initialising 2D array
            m_allTiles = new Tile[width, height];

            //intialising array
            m_allGamePieces = new GamePiece[width, height];

            // to run the setup tile method
            SetupTiles();

            //to setup the camera properly
            SetupCamera();

            //to fill the board with random dots
            FillRandom();

            //to assign boardshuffling
            m_boardShuffler = GetComponent <BoardShuffler>();
        }
    }
예제 #6
0
파일: Board.cs 프로젝트: fasantos83/Match_3
 void Start()
 {
     particleManager = GameObject.FindWithTag("ParticleManager").GetComponent <ParticleManager>();
     boardDeadlock   = GetComponent <BoardDeadlock>();
     boardShuffler   = GetComponent <BoardShuffler>();
     if (allowedGamePiecePrefabs == null || allowedGamePiecePrefabs.Length == 0)
     {
         allowedGamePiecePrefabs = gamePiecePrefabs;
     }
 }
예제 #7
0
    // Start is called before the first frame update
    void Start()
    {
        width  = settings.starters.Length;
        height = settings.starters[0].rowData.Length;

        m_allTiles        = new Tile[width, height];
        m_allGamePieces   = new GamePiece[width, height];
        m_particleManager = GameObject.FindWithTag("Particle Manager").GetComponent <ParticleManager>();
        m_boardDeadlock   = GetComponent <BoardDeadlock>();
        m_boardShuffler   = GetComponent <BoardShuffler>();
    }
예제 #8
0
파일: Board.cs 프로젝트: th-tran/bubble-pop
 void Awake()
 {
     boardBomber      = GetComponent <BoardBomber>();
     boardClearer     = GetComponent <BoardClearer>();
     boardCollapser   = GetComponent <BoardCollapser>();
     boardDeadlock    = GetComponent <BoardDeadlock>();
     boardFiller      = GetComponent <BoardFiller>();
     boardHighlighter = GetComponent <BoardHighlighter>();
     boardInput       = GetComponent <BoardInput>();
     boardMatcher     = GetComponent <BoardMatcher>();
     boardQuery       = GetComponent <BoardQuery>();
     boardSetup       = GetComponent <BoardSetup>();
     boardShuffler    = GetComponent <BoardShuffler>();
     boardTiles       = GetComponent <BoardTiles>();
 }
예제 #9
0
    void Start()
    {
        // initialize the array of tiles
        m_allTiles = new Tile[width, height];

        // intialize the array of game pieces
        m_allGamePieces = new GamePiece[width, height];

        // find the particle manager by tag
        m_particleManager = GameObject.FindWithTag("ParticleManager").GetComponent <ParticleManager>();


        m_boardDeadlock = GetComponent <BoardDeadlock> ();

        m_boardShuffler = GetComponent <BoardShuffler>();
    }