Exemple #1
0
    private void loadWalls()
    {
        GameObject blockPrefab = RoomBlueprint.BlockPrefab;

        RoomCreator.construct(new Vector2(0, floorY), new Vector2(15, 1), blockPrefab, this.transform);
        RoomCreator.construct(new Vector2(0, ceilY), new Vector2(15, 1), blockPrefab, this.transform);
        RoomCreator.construct(new Vector2(leftWallX, floorY + 1), new Vector2(1, 10), blockPrefab, this.transform);
        RoomCreator.construct(new Vector2(rightWallX, floorY + 1), new Vector2(1, 10), blockPrefab, this.transform);
    }
    public virtual GameObject construct(GameObject prefab, Transform parent)
    {
        GameObject created = RoomCreator.construct(startPosition, dimensions, prefab, parent);

        return(created);
    }