Exemplo n.º 1
0
    public GameEntity CreateRandomPiece(int x, int y)
    {
        var entity = _contexts.game.CreateEntity();

        entity.isGameBoardElement = true;
        entity.isMovable          = true;
        entity.isInteractive      = true;
        entity.AddPosition(new IntVector2(x, y));
        entity.AddAsset(randomService.Element(_pieces));
        return(entity);
    }
Exemplo n.º 2
0
    public GameEntity CreateRandomPiece(int x, int y)
    {
        var entity = _contexts.game.CreateEntity();

        entity.isGameBoardElement = true;
        entity.isMovable          = true;
        entity.isInteractive      = true;
        entity.AddMove(new IntVector2(x, y));
        entity.AddEffectState(ItemEffctName.NONE);
        entity.AddLoadPrefab(randomService.Element(_items));
        return(entity);
    }