File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public/assets/kenney/
1919 idle/
2020 jump/
2121 walk/
22+ UI/
2223```
2324
2425## Reglas
@@ -59,6 +60,13 @@ public/assets/kenney/
5960| ` TERRAIN_GRASS_TOP ` | ` public/assets/kenney/tiles/ground/terrain_grass_top.png ` |
6061| ` TERRAIN_GRASS_BOTTOM ` | ` public/assets/kenney/tiles/ground/terrain_grass_bottom.png ` |
6162
63+ ### UI
64+
65+ | Key | Archivo | Uso previsto |
66+ | --- | --- | --- |
67+ | ` UI_RECTANGLE_GRADIENT ` | ` public/assets/kenney/UI/rectangle_gradient.png ` | Barra de estado / contenedor UI |
68+ | ` UI_ROUND_FLAT ` | ` public/assets/kenney/UI/round_flat.png ` | Fondo de botón o icono |
69+
6270## Cómo cargar assets en Phaser
6371
6472``` ts
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export const ENEMY_BLOCK_1 = 'kenney-enemy-block-1';
1414export const ENEMY_BLOCK_2 = 'kenney-enemy-block-2' ;
1515export const TERRAIN_GRASS_TOP = 'kenney-terrain-grass-top' ;
1616export const TERRAIN_GRASS_BOTTOM = 'kenney-terrain-grass-bottom' ;
17+ export const UI_RECTANGLE_GRADIENT = 'kenney-ui-rectangle-gradient' ;
18+ export const UI_ROUND_FLAT = 'kenney-ui-round-flat' ;
1719
1820const KENNEY_BASE_PATH = 'assets/kenney' ;
1921
@@ -33,3 +35,5 @@ export const ENEMY_BLOCK_1_PATH = `${KENNEY_BASE_PATH}/objects-enemies/enemies/b
3335export const ENEMY_BLOCK_2_PATH = `${ KENNEY_BASE_PATH } /objects-enemies/enemies/blocks/block_2.png` ;
3436export const TERRAIN_GRASS_TOP_PATH = `${ KENNEY_BASE_PATH } /tiles/ground/terrain_grass_top.png` ;
3537export const TERRAIN_GRASS_BOTTOM_PATH = `${ KENNEY_BASE_PATH } /tiles/ground/terrain_grass_bottom.png` ;
38+ export const UI_RECTANGLE_GRADIENT_PATH = `${ KENNEY_BASE_PATH } /UI/rectangle_gradient.png` ;
39+ export const UI_ROUND_FLAT_PATH = `${ KENNEY_BASE_PATH } /UI/round_flat.png` ;
Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ import {
3030 PLAYER_WALK_A ,
3131 PLAYER_WALK_A_PATH ,
3232 PLAYER_WALK_B ,
33- PLAYER_WALK_B_PATH
33+ PLAYER_WALK_B_PATH ,
34+ UI_RECTANGLE_GRADIENT ,
35+ UI_RECTANGLE_GRADIENT_PATH ,
36+ UI_ROUND_FLAT ,
37+ UI_ROUND_FLAT_PATH
3438} from './kenney' ;
3539
3640export const loadKenneyAssets = ( scene : Phaser . Scene ) => {
@@ -50,4 +54,6 @@ export const loadKenneyAssets = (scene: Phaser.Scene) => {
5054 scene . load . image ( ENEMY_BLOCK_2 , ENEMY_BLOCK_2_PATH ) ;
5155 scene . load . image ( TERRAIN_GRASS_TOP , TERRAIN_GRASS_TOP_PATH ) ;
5256 scene . load . image ( TERRAIN_GRASS_BOTTOM , TERRAIN_GRASS_BOTTOM_PATH ) ;
57+ scene . load . image ( UI_RECTANGLE_GRADIENT , UI_RECTANGLE_GRADIENT_PATH ) ;
58+ scene . load . image ( UI_ROUND_FLAT , UI_ROUND_FLAT_PATH ) ;
5359} ;
You can’t perform that action at this time.
0 commit comments