Merge branch 'DebugMap'

# Conflicts:
#	DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
This commit is contained in:
Mootfrost777 2023-08-18 01:40:27 +03:00
commit e73e363a78
6 changed files with 402 additions and 25 deletions

View file

@ -0,0 +1,373 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="200" height="200" tilewidth="16" tileheight="16" infinite="1" nextlayerid="8" nextobjectid="49">
<tileset firstgid="1" source="../Documents/Github_repos/DangerousD/DangerousD/Content/map.tsx"/>
<layer id="3" name="Слой тайлов 3" class="Tile" width="200" height="200">
<data encoding="csv">
<chunk x="0" y="-16" width="16" height="16">
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,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,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,0,0,0,0,0,0,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570
</chunk>
<chunk x="16" y="-16" width="16" height="16">
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,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,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,0,0,0,0,0,0,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570
</chunk>
<chunk x="0" y="0" width="16" height="16">
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
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,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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk>
<chunk x="16" y="0" width="16" height="16">
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
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,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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk>
</data>
</layer>
<layer id="1" name="Collidable" class="StopTile" width="200" height="200">
<data encoding="csv">
<chunk x="-32" y="0" width="16" height="16">
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,0,0,
0,0,0,0,0,0,0,0,0,0,0,50,50,50,50,50,
0,0,0,0,0,0,0,0,0,0,0,50,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,50,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,49,49,49,49,
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,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,0,0,0,0
</chunk>
<chunk x="-16" y="0" width="16" height="16">
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,0,0,
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,
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,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,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,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,0,0,0,0,0,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
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,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,0,0,0,0
</chunk>
<chunk x="0" y="0" width="16" height="16">
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,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,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,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,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,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,
371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
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,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,0,0,0,0
</chunk>
<chunk x="16" y="0" width="16" height="16">
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,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,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,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,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,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,
371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
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,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,0,0,0,0
</chunk>
<chunk x="32" y="0" width="16" height="16">
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,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,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,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,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,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
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,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,0,0,0,0
</chunk>
<chunk x="48" y="0" width="16" height="16">
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,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,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,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,0,0,0,0,0,0,0
</chunk>
</data>
</layer>
<objectgroup id="7" name="Player" class="LivingEntities">
<object id="42" name="DEBUGUS" type="Player" x="236.506" y="-54.4681">
<point/>
</object>
</objectgroup>
<objectgroup id="6" name="Zombies" class="LivingEntities.Monsters.Zombie">
<object id="17" x="568" y="130">
<point/>
</object>
<object id="18" x="614" y="126">
<point/>
</object>
<object id="19" x="656" y="137">
<point/>
</object>
<object id="20" x="688" y="124">
<point/>
</object>
<object id="21" x="739" y="128">
<point/>
</object>
<object id="22" x="754" y="127">
<point/>
</object>
<object id="23" x="777" y="125">
<point/>
</object>
<object id="24" x="803" y="127">
<point/>
</object>
<object id="25" x="834" y="128">
<point/>
</object>
<object id="26" x="867" y="124">
<point/>
</object>
<object id="27" x="876" y="123">
<point/>
</object>
<object id="28" x="909" y="114">
<point/>
</object>
<object id="29" x="933" y="108">
<point/>
</object>
<object id="30" x="931" y="65">
<point/>
</object>
<object id="31" x="880" y="74">
<point/>
</object>
<object id="32" x="829" y="76">
<point/>
</object>
<object id="33" x="804" y="78">
<point/>
</object>
<object id="34" x="772" y="78">
<point/>
</object>
<object id="35" x="740" y="77">
<point/>
</object>
<object id="36" x="713" y="73">
<point/>
</object>
<object id="37" x="684" y="73">
<point/>
</object>
<object id="38" x="659" y="75">
<point/>
</object>
<object id="39" x="632" y="82">
<point/>
</object>
<object id="40" x="612" y="89">
<point/>
</object>
<object id="41" x="604" y="92">
<point/>
</object>
</objectgroup>
<layer id="2" name="Слой тайлов 2" class="Tile" width="200" height="200">
<data encoding="csv">
<chunk x="0" y="-16" width="16" height="16">
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,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,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,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,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0
</chunk>
<chunk x="16" y="-16" width="16" height="16">
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,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,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,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,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,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370
</chunk>
<chunk x="0" y="0" width="16" height="16">
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
382,383,0,0,0,0,0,0,0,0,382,383,0,0,0,0,
395,396,0,0,0,0,0,0,0,0,395,396,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,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,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk>
<chunk x="16" y="0" width="16" height="16">
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,382,383,0,0,0,0,0,0,0,0,382,383,
0,0,0,0,395,396,0,0,0,0,0,0,0,0,395,396,
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,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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk>
</data>
</layer>
<objectgroup id="5" name="Various enemies" class="LivingEntities.Monsters">
<object id="7" type="SilasMaster" x="126" y="-25">
<point/>
</object>
<object id="8" type="Frank" x="425" y="60">
<point/>
</object>
<object id="10" type="FrankBalls" x="413" y="50">
<point/>
</object>
<object id="11" type="FrankBalls" x="439" y="52">
<point/>
</object>
<object id="12" type="FlameSkull" x="649" y="-17">
<point/>
</object>
<object id="13" type="Slime" x="-178" y="118">
<point/>
</object>
<object id="15" type="Spider" x="-94" y="109.333">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="11" nextobjectid="49">
<tileset firstgid="1" source="map.tsx"/>
<layer id="1" name="Collision" class="StopTile" width="30" height="20" locked="1" offsetx="-352.033" offsety="192.098">
<layer id="1" name="Collision" class="StopTile" width="30" height="20" visible="0" offsetx="-352.033" offsety="192.098">
<data encoding="csv">
<chunk x="0" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -130,19 +130,19 @@
0,0,0,0,0,0,0,0,0,0,13,75,0,0,0,0
</chunk>
<chunk x="16" y="0" width="16" height="16">
52,0,0,0,52,0,0,0,52,52,52,52,52,52,52,52,
52,0,0,0,0,0,0,0,52,52,52,52,52,52,52,52,
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,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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
52,52,0,0,52,0,0,52,52,52,52,52,52,52,52,52,
52,52,0,0,0,0,0,52,52,52,52,52,52,52,52,52,
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,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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
52,52,52,0,52,0,52,52,52,52,52,52,52,52,52,52,
52,52,52,0,0,0,52,52,52,52,52,52,52,52,52,52,
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,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
@ -441,7 +441,7 @@
</chunk>
</data>
</layer>
<layer id="6" name="Ladders" class="Platform" width="30" height="20" locked="1">
<layer id="6" name="Ladders" class="Platform" width="30" height="20" visible="0" locked="1">
<data encoding="csv">
<chunk x="-16" y="0" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -701,7 +701,7 @@
</chunk>
</data>
</layer>
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie" locked="1">
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie" visible="0">
<object id="26" x="265" y="469.5">
<point/>
</object>

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

View file

@ -25,6 +25,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public int leftBorder;
public bool isVisible = true;
private bool isAttacked = false;
public bool isInvincible = false;
public GameObject objectAttack;
public Player(Vector2 position) : base(position)
@ -40,7 +41,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
velocity = new Vector2(0, 0);
rightBorder = (int)position.X + 100;
leftBorder = (int)position.X - 100;
}
public Player(Vector2 position, bool isInvincible = false) : this(position)
{
this.isInvincible = isInvincible;
}
public bool IsAlive { get { return isAlive; } }

View file

@ -9,6 +9,7 @@ using Microsoft.Xna.Framework.Graphics;
using System.Xml.Serialization;
using DangerousD.GameCore.GameObjects;
using System.Globalization;
using DangerousD.GameCore.GameObjects.LivingEntities;
namespace DangerousD.GameCore.Managers
{
@ -70,21 +71,7 @@ namespace DangerousD.GameCore.Managers
Rectangle sourceRect = new(new Point((tiles[i] -1) % _columns, (tiles[i] -1) / _columns) * tileSize.ToPoint(), tileSize.ToPoint());
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.MapObjects.{tileType}");
Activator.CreateInstance(type, pos, tileSize * _scale, sourceRect);
/*switch (tileType)
{
case "collidable":
new StopTile(pos, tileSize * _scale, sourceRect);
break;
case "platform":
new Platform(pos, tileSize * _scale, sourceRect);
break;
case "non_collidable":
new Tile(pos, tileSize * _scale, sourceRect);
break;
}*/
}
}
}
}
@ -100,13 +87,25 @@ namespace DangerousD.GameCore.Managers
private void InstantiateEntities(XmlNode group)
{
string entityType = group.Attributes["class"].Value;
string entityGroup = group.Attributes["class"] is not null ? group.Attributes["class"].Value : "";
float offsetX = group.Attributes["offsetx"] is not null ? float.Parse(group.Attributes["offsetx"].Value) : 0;
float offsetY = group.Attributes["offsety"] is not null ? float.Parse(group.Attributes["offsety"].Value) : 0;
foreach (XmlNode entity in group.ChildNodes)
{
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityType}");
Entity inst = (Entity)Activator.CreateInstance(type, new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX, float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY) * _scale);
string entityType = entity.Attributes["type"] is not null ? "." + entity.Attributes["type"].Value : "";
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityGroup}{entityType}");
Vector2 pos =
new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX,
float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY) * _scale;
Entity inst;
if (type.Equals(typeof(Player)) && entity.Attributes["name"] is not null && entity.Attributes["name"].Value == "DEBUGUS")
{
inst = (Entity)Activator.CreateInstance(type, pos, true);
}
else
{
inst = (Entity)Activator.CreateInstance(type, pos);
}
inst.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height));
inst.Height *= _scale;
inst.Width *= _scale;