//================================================ //получить камень из квадрата выше public void getFromSquare(GameAreaSquare square) { type = square.type; brick_name = square.brick_name; brick = square.brick; ostatokMove = square.ostatokMove + GameConstants.AREA_SQUARE_SIZE.y; cur_spd = 0f; //float delta = (square.ostatokMove > 0f) ? square.ostatokMove : GameConstants.AREA_SQUARE_SIZE.y; //IncOstatokMove( delta ); }
public string time_end_triger_name = "CapacityFull"; //or LevelUp private void Awake() { //gameController = GetComponent<GameController>(); //scoresController = GetComponent<ScoresController>(); for (int x = 0; x < GameConstants.AREA_WIDTH; x++) { for (int y = 0; y < GameConstants.AREA_REAL_HEIGHT; y++) { area[x, y] = new GameAreaSquare(); //myUtils.console_log(area[x, y]); } } }
//создание линии анимации public OneFilledLine(int _y, List <int> _squaresTypes, Transform parent) { //myUtils.console_log("add line y=", _y); y = _y; next_anim_time = 0; end_anim_time = Time.time + 1f; squaresList = new List <GameAreaSquare>(); for (int x = 0; x < _squaresTypes.Count; x++) { GameAreaSquare sq = new GameAreaSquare(); Vector2 crd = new Vector2( GameConstants.AREA_START.x + GameConstants.AREA_SQUARE_SIZE.x * ((float)x + 0.5f), GameConstants.AREA_START.y + GameConstants.AREA_SQUARE_SIZE.y * ((float)y + 0.5f) ); //теперь генерация sq.Setup(crd, parent, GameConstants.AREA_SQUARE_SCALE, _squaresTypes[x], GameConstants.sANIM_FILL_LINE); squaresList.Add(sq); //_squares[0].SetAnimator(GameConstants.sANIM_FILL_LINE); //squaresList.Add(_squares[0]); //_squares.RemoveAt(0); } }