add rock text

This commit is contained in:
Jee Yeon Kim 2025-04-21 00:34:13 +09:00
parent 2df09851d9
commit 85e86033ad
3 changed files with 39 additions and 3 deletions

View File

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 296 B

BIN
assets/Text_ROCK.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

42
main.js
View File

@ -11,13 +11,18 @@ let is_img;
let tileMap = [
' ',
'wtwwwwwwwwwwwwww',
'wt ttttttt ttttw',
'wt itttttttitttw',
'wtt tt ttttttttw',
'wtttttttttt tttw',
'wt ttttttt ttttw',
'wt ttwtttt ttttw',
'wttt rtt llt ttw',
'wtt tttt ll ttfw',
'w tttaa ttwt ttw',
'wttt aatt wttttw',
'wttttttttttttttw',
'wtti tttttfitttw',
'wt*i@ttttt^i#ttw',
'wtttttttt tttttw',
'wwwwwwwwwwwwwwww',
];
@ -53,11 +58,14 @@ function preload(){
water_img = loadImage("/assets/Water.webp");
lava_img = loadImage("/assets/Lava.webp");
flag_img = loadImage("/assets/Flag.webp");
is_img = loadImage("/assets/Text_IS_0.webp");
is_img = loadImage("/assets/Text_IS.webp");
win_img = loadImage("/assets/Win.webp");
you_img = loadImage("/assets/You.webp");
move_img = loadImage("/assets/Move.webp");
stopText_img = loadImage("/assets/Stop.webp");
baba_text_img = loadImage("/assets/Text_BABA.webp");
flag_text_img = loadImage("/assets/Text_FLAG.webp");
}
function setup(){
@ -114,10 +122,38 @@ function setup(){
// is
let is = new Group();
is.img = is_img;
is.collider = 'none';
is.collider = 'dyinamic';
is.tile = 'i';
is.scale = tileSize/is_img.width;
// flag_text
let flag_text = new Group();
flag_text.img = flag_text_img;
flag_text.collider = 'dyinamic';
flag_text.tile = '^';
flag_text.scale = tileSize/flag_text_img.width;
// baba_text
let baba_text = new Group();
baba_text.img = baba_text_img;
baba_text.collider = 'dyinamic';
baba_text.tile = '*';
baba_text.scale = tileSize/baba_text_img.width;
// you
let you = new Group();
you.img = you_img;
you.collider = 'dyinamic';
you.tile = '@';
you.scale = tileSize/you_img.width;
// win
let win_text = new Group();
win_text.img = win_img;
win_text.collider = 'dyinamic';
win_text.tile = '#';
win_text.scale = tileSize/win_img.width;
new Tiles(tileMap, tileSize/2, tileSize/2, tileSize, tileSize);
//BABA