Añadiendo enemigos

This commit is contained in:
2022-09-16 16:55:57 +02:00
parent 06cb1e748d
commit 93bf8cecb7
12 changed files with 257 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ border=blue
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=0
roomLeft=13.room
roomRight=01.room
[tilemap]

View File

@@ -15,8 +15,8 @@
26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,0,0,0,0,26,
26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,
26,0,0,0,0,0,0,0,0,0,163,26,26,26,26,26,26,26,26,183,0,0,0,0,0,0,22,22,0,0,0,26,
26,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,183,0,0,0,0,0,0,0,0,0,0,0,
26,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,183,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,183,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,183,0,0,0,0,0,0,0,0,0,0,
26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26
</data>

188
data/room/13.room Normal file
View File

@@ -0,0 +1,188 @@
name=know your enemy
bgColor=black
border=red
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=0
roomRight=06.room
[tilemap]
13.tmx
[/tilemap]
[enemy]
tileset=batman.png
animation=batman.ani
width=8
height=16
x=2
y=2
vx=0
vy=0
x1=2
y1=2
x2=2
y2=2
color=red
[/enemy]
[enemy]
tileset=bin.png
animation=bin.ani
width=16
height=8
x=5
y=2
vx=0
vy=0
x1=5
y1=2
x2=5
y2=2
color=red
[/enemy]
[enemy]
tileset=bird.png
animation=bird.ani
width=16
height=16
x=8
y=2
vx=0
vy=0
x1=8
y1=2
x2=8
y2=2
color=red
[/enemy]
[enemy]
tileset=chip.png
animation=chip.ani
width=8
height=16
x=11
y=2
vx=0
vy=0
x1=11
y1=2
x2=11
y2=2
color=red
[/enemy]
[enemy]
tileset=diskette.png
animation=diskette.ani
width=16
height=16
x=14
y=2
vx=0
vy=0
x1=14
y1=2
x2=14
y2=2
color=red
[/enemy]
[enemy]
tileset=matatunos.png
animation=matatunos.ani
width=16
height=16
x=17
y=2
vx=0
vy=0
x1=17
y1=2
x2=17
y2=2
color=red
[/enemy]
[enemy]
tileset=paco.png
animation=paco.ani
width=16
height=16
x=20
y=2
vx=0
vy=0
x1=20
y1=2
x2=20
y2=2
color=red
[/enemy]
[enemy]
tileset=qvoid.png
animation=qvoid.ani
width=16
height=16
x=23
y=2
vx=0
vy=0
x1=23
y1=2
x2=23
y2=2
color=red
[/enemy]
[enemy]
tileset=sigmasua.png
animation=sigmasua.ani
width=16
height=16
x=26
y=2
vx=0
vy=0
x1=26
y1=2
x2=26
y2=2
color=red
[/enemy]
[enemy]
tileset=tuno.png
animation=tuno.ani
width=16
height=16
x=2
y=5
vx=0
vy=0
x1=2
y1=5
x2=2
y2=5
color=red
[/enemy]
[enemy]
tileset=wave.png
animation=wave.ani
width=8
height=8
x=5
y=5
vx=0
vy=0
x1=5
y1=5
x2=5
y2=5
color=red
[/enemy]

24
data/room/13.tmx Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25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
media/enemies/batman.ani Normal file
View File

@@ -0,0 +1,10 @@
frames_per_row=4
frame_width=8
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3
[/animation]

BIN
media/enemies/batman.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

View File

@@ -0,0 +1,10 @@
frames_per_row=6
frame_width=16
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5
[/animation]

BIN
media/enemies/matatunos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

10
media/enemies/tuno.ani Normal file
View File

@@ -0,0 +1,10 @@
frames_per_row=4
frame_width=16
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,3,2,1,0
[/animation]

BIN
media/enemies/tuno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

View File

@@ -362,6 +362,7 @@ bool Director::setFileList()
asset->add("/data/room/10.room", room);
asset->add("/data/room/11.room", room);
asset->add("/data/room/12.room", room);
asset->add("/data/room/13.room", room);
asset->add("/data/room/01.tmx", room);
asset->add("/data/room/02.tmx", room);
asset->add("/data/room/03.tmx", room);
@@ -374,6 +375,7 @@ bool Director::setFileList()
asset->add("/data/room/10.tmx", room);
asset->add("/data/room/11.tmx", room);
asset->add("/data/room/12.tmx", room);
asset->add("/data/room/13.tmx", room);
asset->add("/media/tilesets/standard.png", bitmap);
@@ -393,6 +395,12 @@ bool Director::setFileList()
asset->add("/media/enemies/bin.ani", data);
asset->add("/media/enemies/qvoid.png", bitmap);
asset->add("/media/enemies/qvoid.ani", data);
asset->add("/media/enemies/batman.png", bitmap);
asset->add("/media/enemies/batman.ani", data);
asset->add("/media/enemies/tuno.png", bitmap);
asset->add("/media/enemies/tuno.ani", data);
asset->add("/media/enemies/matatunos.png", bitmap);
asset->add("/media/enemies/matatunos.ani", data);
asset->add("/media/player/player.png", bitmap);
asset->add("/media/player/player.ani", data);

View File

@@ -24,8 +24,10 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
// currentRoom = "06.room";
// spawnPoint = {14 * 8, 9 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
currentRoom = "04.room";
spawnPoint = {9 * 8, 11 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
currentRoom = "13.room";
const int x = 28;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_NONE};
// ****
// Crea los objetos