当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript renderer.createResources函数代码示例

本文整理汇总了TypeScript中src/viseur/renderer.createResources函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createResources函数的具体用法?TypeScript createResources怎么用?TypeScript createResources使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了createResources函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: createResources

import { createResources, load } from "src/viseur/renderer";

/** These are the resources (sprites) that are loaded and usable by game objects in Checkers. */
export const GameResources = createResources("Checkers", {
    // <<-- Creer-Merge: resources -->>
    piece: load("piece.png"),
    kinged: load("kinged.png"),

    tileBlack: load("tile-black.png"),
    tileRed: load("tile-red.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:12,代码来源:index.ts

示例2: createResources

import { createResources, load } from "src/viseur/renderer";

/** These are the resources (sprites) that are loaded and usable by game objects in Chess. */
export const GameResources = createResources("Chess", {
    // <<-- Creer-Merge: resources -->>
    piecesTop: load("./pieces-top.png", {sheet: {width: 3, height: 2, axis: "x"}}),
    piecesBottom: load("./pieces-bottom.png", {sheet: {width: 3, height: 2, axis: "x"}}),

    tileWhite: load("./tile-white.png"),
    tileBlack: load("./tile-black.png"),

    overlay: load("./overlay.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:14,代码来源:index.ts

示例3: createResources

import { createResources, load } from "src/viseur/renderer";

/** These are the resources (sprites) that are loaded and usable by game objects in Stardash. */
export const GameResources = createResources("Stardash", {
    // <<-- Creer-Merge: resources -->>
    background: load("spacebackground.png"),
    test: load("test.png"),
    sun: load("sun2.png"),
    earth_planet: load("earth2.png"),
    alien_planet: load("alien2.png"),
    corvette: load("corvette.png"),
    genarium: load("genarium.png"),
    rarium: load("rarium.png"),
    legendarium: load("legendarium.png"),
    mythicite: load("mythicite.png"),
    miner: load("miner.png"),
    martyr: load("martyr.png"),
    missleboat: load("missleboat.png"),
    transport: load("transport.png"),
    shield: load("shield.png"),
    beam: load("beam.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:23,代码来源:index.ts

示例4: createResources

/** These are the resources (sprites) that are loaded and usable by game objects in Anarchy. */
export const GameResources = createResources("Anarchy", {
    // <<-- Creer-Merge: resources -->>
    tile: load("tile.jpg"),

    building: load("building_building.png"),
    dead: load("building_dead.png"),

    warehouseFront: load("building_warehouse_front.png"),
    policeDepartmentFront: load("building_policedepartment_front.png"),
    weatherStationFront: load("building_weatherstation_front.png"),
    fireDepartmentFront: load("building_firedepartment_front.png"),

    warehouseBack: load("building_warehouse_back.png"),
    policeDepartmentBack: load("building_policedepartment_back.png"),
    weatherStationBack: load("building_weatherstation_back.png"),
    fireDepartmentBack: load("building_firedepartment_back.png"),

    graffiti0: load("graffiti_1.png"),
    graffiti1: load("graffiti_2.png"),

    beam: load("beam.png"),
    arrow: load("arrow.png"),
    // this sprite is 2x2, not 1x1 like most
    rotation: load("rotation.png", { width: 2, height: 2 }),

    // we want 1,0 to be 1, then 2,0 to be 2, ..., then 1,0 to be 4
    fire: load("fire.png", { sheet: { width: 4, height: 2, axis: "x" } }),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:30,代码来源:index.ts

示例5: createResources

export const GameResources = createResources("Saloon", {
    // <<-- Creer-Merge: resources -->>

    // Tiles
    hazardBrokenGlass: load("broken_glass.png"),
    tile: load("tile.jpg"),
    wall: load("wall.jpg"),
    wallSide: load("wall_side.jpg"),
    shade: load("shade.jpg"),
    wallCorner: load("wall_corner.jpg"),
    railHorizontal: load("rail_h.png"),
    railVertical: load("rail_v.png"),

    // Cowboys
    cowboySharpshooterBottom: load("cowboy_sharpshooter_bottom.png"),
    cowboyBartenderBottom: load("cowboy_bartender_bottom.png"),
    cowboyBrawlerBottom: load("cowboy_brawler_bottom.png"),

    cowboySharpshooterTop: load("cowboy_sharpshooter_top.png"),
    cowboyBartenderTop: load("cowboy_bartender_top.png"),
    cowboyBrawlerTop: load("cowboy_brawler_top.png"),

    // Furnishings
    piano: load("piano.png"),
    furnishing: load("furnishing.png"),

    // YoungGuns
    youngGunTop: load("young-gun_top.png"),
    youngGunBottom: load("young-gun_bottom.png"),

    // Misc
    bottle: load("bottle.png"),
    shotHead: load("shot_head.png"),
    shotBody: load("shot_body.png"),
    hit: load("hit.png"),
    music: load("music.png"),
    brawlAttack: load("brawl-attack.png"),

    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:40,代码来源:index.ts

示例6: createResources

export const GameResources = createResources("Stumped", {
    // <<-- Creer-Merge: resources -->>
    // "example": load("example.png"),
    beaver0: load("beaver_0.png"),
    beaver1: load("beaver_1.png"),

    beaverTail: load("beaver_tail.png"),

    distracted1: load("distracted_1.png"),
    distracted2: load("distracted_2.png"),
    distracted3: load("distracted_3.png"),

    jobFighter: load("job_fighter.png"),
    jobBulky: load("job_bulky.png"),
    jobHungry: load("job_hungry.png"),
    jobSwift: load("job_swift.png"),
    jobHotLady: load("job_sexylady.png"),
    jobBuilder: load("job_builder.png"),

    lodgeBottom: load("lodge_bottom.png"),
    lodgeTop: load("lodge_top.png"),
    attacking: load("status_attacking.png"),
    gettingBranch: load("status_branches.png"),
    gettingFood: load("status_food.png"),
    flow: load("tile_flow_direction.png"),
    tileBranch: load("tile_branches.png"),
    tileFood: load("tile_food.png"),
    tileLand: load("tile_land.png"),
    tileWater: load("tile_water.png"),
    tileset: load("tileset.png", {
        sheet: {
            axis: "x",
            width: 8,
            height: 6,
        },
    }),
    branches0: load("tree_0.png"),
    branches1: load("tree_1.png"),
    branches2: load("tree_2.png"),
    branches3: load("tree_3.png"),

    food0: load("food_0.png"),
    food1: load("food_1.png"),
    food2: load("food_2.png"),
    food3: load("food_3.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:47,代码来源:index.ts

示例7: createResources

import { createResources, load } from "src/viseur/renderer";

/** These are the resources (sprites) that are loaded and usable by game objects in Spiders. */
export const GameResources = createResources("Spiders", {
    // <<-- Creer-Merge: resources -->>
    background: load("background.jpg", {
        width: 16,
        height: 9,
    }),

    broodmotherTop: load("./broodmother-top.png"),
    broodmotherBottom: load("./broodmother-bottom.png"),

    nest: load("nest.png"),

    webMiddle: load("web-middle.png"),
    webEnd: load("web-end.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:19,代码来源:index.ts

示例8: createResources

export const GameResources = createResources("Newtonian", {
    // <<-- Creer-Merge: resources -->>

    // Tiles
    floor: load("floor.png"),
    wall: load("wall.png"),
    spawn: load("spawn.jpg"),
    genRoom: load("genRoom.jpg"),
    conveyor: load("conveyor.png"),
    machine: load("machine.png"),

    // Resources on tiles
    resourceBar: load("./resource-bar.png"),
    resourceOre: load("./resource-ore.png"),

    // Unit by jobs
    internBottom: load("./intern-bottom.png"),
    internTop: load("./intern-top.png"),
    physicistBottom: load("./physicist-bottom.png"),
    physicistTop: load("./physicist-top.png"),
    managerBottom: load("./manager-bottom.png"),
    managerTop: load("./manager-top.png"),

    // intern: load("intern.png"),
    // physicist: load("physicist.png"),
    // manager: load("manager.png"),
    // redore: load("rediumore.png"),
    // blueore: load("blueiumore.png"),
    //  red: load("redium.png"),
    // blue: load("blueium.png"),
    door: load("door.png"),
    openDoor: load("openDoor.png"),
    eastDoor: load("eastDoor.png"),
    eastOpenDoor: load("eastOpenDoor.png"),
    // load files like this,
    // and remember to remove these lines and file!
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:38,代码来源:index.ts

示例9: createResources

import { createResources, load } from "src/viseur/renderer";

/** These are the resources (sprites) that are loaded and usable by game objects in Pirates. */
export const GameResources = createResources("Pirates", {
    // <<-- Creer-Merge: resources -->>

    land: load("land.png"),
    water: load("water.png"),
    port: load("port.png"),
    ship: load("ship.png"),
    pirate: load("pirate.png"),
    dropShadow: load("dropShadow.png"),
    gold: load("gold.png"),
    rotatedPort: load("rotatedPort.png"),
    flag: load("flag.png"),
    shirt: load("shirt.png"),
    portColor: load("portColor.png"),
    rotatedPortColor: load("rotatedPortColor.png"),
    grass: load("grass.png"),
    plants: load("plants.png"),
    tree: load("tree.png"),
    water2: load("water2.png"),
    // <<-- /Creer-Merge: resources -->>
});
开发者ID:siggame,项目名称:Viseur,代码行数:24,代码来源:index.ts


注:本文中的src/viseur/renderer.createResources函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。