Exemple #1
0
    void CreateNextStock(ISetting setting)
    {
        _groupStocks.Add(_groupFactory.Create(setting));

        int i = 0;

        foreach (IGroup group in _groupStocks)
        {
            group.Parent.position = _stockDisplayConfig[i].position;
            if (_stockDisplayConfig[i].scale != Vector3.zero)
            {
                group.Parent.localScale = _stockDisplayConfig[i].scale;
            }
            group.SetLocation(new Coord(0, 0));

            i++;
        }
    }
Exemple #2
0
    public void OnUpdate()
    {
        if (_onDeleteEndEvent != null)
        {
            _onDeleteEndEvent(_grid);
        }

        if (_grid.CurrenteStateName == GridStates.GameOver)
        {
            return;
        }

        IGroup group = _groupFactory.Create(_setting);

        _grid.ResetChains();
        if (_grid.AddGroup(group))
        {
            _grid.SetState(GridStates.OnControlGroup);
        }
        else
        {
            _grid.GameOver();
        }
    }
Exemple #3
0
    public bool AddGroupToTheGrid(IBlockPattern blockPattern, IGroupPattern groupPattern)
    {
        IGroup group = _groupFactory.Create(_setting, blockPattern, groupPattern);

        return(_grid.AddGroup(group));
    }