Merge remote-tracking branch 'origin/main'

This commit is contained in:
Ivan Filipenkov 2023-08-18 01:52:42 +03:00
commit 3a3542af7e
11 changed files with 501 additions and 45 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -0,0 +1 @@
{"id":"playerReload","textureName":"playerAnimation","startSpriteRectangle":{"X":101,"Y":67,"Width":24,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"playerShootLeft","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":34,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"}

View file

@ -0,0 +1 @@
{"id":"playerShootRight","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":1,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"}

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,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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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,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

@ -1,4 +1,4 @@
using DangerousD.GameCore.Graphics;
 using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

View file

@ -27,8 +27,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
Height = 40;
monster_speed = 3;
name = "Zombie";
leftBorder = (int)position.X - 50;
rightBorder = (int)position.X + 50;
monster_health = 2;
leftBorder = (int)position.X - 100;
rightBorder = (int)position.X + 100;
physicsManager = new PhysicsManager();
Random random = new Random();
if(random.Next(0, 2) == 0)
@ -77,7 +78,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Death()
{
AppManager.Instance.GameManager.Remove(this);
}
public override void Move(GameTime gameTime)
@ -154,5 +155,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public void Attack(GameTime gameTime)
{}
public void TakeDamage()
{
monster_health--;
GraphicsComponent.StartAnimation("ZombieRightAttack");
if (monster_health <= 0)
{
Death();
}
}
}
}

View file

@ -8,7 +8,7 @@ using System.Threading.Tasks;
using DangerousD.GameCore.GameObjects.PlayerDeath;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using DangerousD.GameCore.Network;
using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
namespace DangerousD.GameCore.GameObjects.LivingEntities
{
@ -25,7 +25,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public int leftBorder;
public bool isVisible = true;
private bool isAttacked = false;
private bool isShooting = false;
public GameObject objectAttack;
private int bullets;
public Player(Vector2 position) : base(position)
{
@ -36,17 +38,30 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
AppManager.Instance.InputManager.MovEventJump += Jump;
AppManager.Instance.InputManager.MovEventDown += MoveDown;
AppManager.Instance.InputManager.ShootEvent += Shoot;
velocity = new Vector2(0, 0);
rightBorder = (int)position.X + 100;
leftBorder = (int)position.X - 100;
bullets = 5;
this.GraphicsComponent.actionOfAnimationEnd += (a) =>
{
if (a == "playerShootLeft" || a == "playerShootRight")
{
isShooting = false;
}
if (a == "playerReload")
{
bullets++;
}
};
}
public bool IsAlive { get { return isAlive; } }
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft",
"playerJumpRight" , "playerJumpLeft"}, "playerStayLeft");
"playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload"}, "playerReload");
public void Attack()
{
@ -54,6 +69,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
{
isVisible = false;
}
}
public override void OnCollision(GameObject gameObject)
{
@ -92,9 +108,47 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
public void Shoot()
{
if (bullets > 0)
{
if (!isShooting)
{
isShooting = true;
bullets--;
if (isRight)
{
if (GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
GraphicsComponent.StartAnimation("playerShootRight");
}
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), 100, 10), typeof(Zombie));
if (targets != null)
{
foreach (var target in targets)
{
Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage();
}
}
}
else
{
if (GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
GraphicsComponent.StartAnimation("playerShootRight");
}
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), -100, 10), typeof(Zombie));
if (targets != null)
{
foreach (var target in targets)
{
Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage();
}
}
}
}
}
}
public override void Update(GameTime gameTime)
{
GraphicsComponent.SetCameraPosition(Pos);
@ -113,25 +167,41 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
{
float delta = (float)gameTime.ElapsedGameTime.TotalSeconds;
velocity.X = 5 * AppManager.Instance.InputManager.VectorMovementDirection.X;
if (AppManager.Instance.InputManager.VectorMovementDirection.X > 0)
if (GraphicsComponent.GetCurrentAnimation != "playerShootLeft" && GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
if (GraphicsComponent.GetCurrentAnimation != "playerMoveRight")//идёт направо
if (AppManager.Instance.InputManager.VectorMovementDirection.X > 0)
{
GraphicsComponent.StartAnimation("playerMoveRight");
isRight = true;
if (GraphicsComponent.GetCurrentAnimation != "playerMoveRight")//идёт направо
{
GraphicsComponent.StartAnimation("playerMoveRight");
}
}
}
else if (AppManager.Instance.InputManager.VectorMovementDirection.X < 0)//идёт налево
{
if (GraphicsComponent.GetCurrentAnimation != "playerMoveLeft")
else if (AppManager.Instance.InputManager.VectorMovementDirection.X < 0)//идёт налево
{
GraphicsComponent.StartAnimation("playerMoveLeft");
isRight = false;
if (GraphicsComponent.GetCurrentAnimation != "playerMoveLeft")
{
GraphicsComponent.StartAnimation("playerMoveLeft");
}
}
}
else if(AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит
{
if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveLeft")
else if (AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит
{
GraphicsComponent.StartAnimation("ZombieMoveLeft");
if(bullets < 5)
{
if (GraphicsComponent.GetCurrentAnimation != "playerReload")
{
GraphicsComponent.StartAnimation("playerReload");
}
}
else if (isRight)
{
GraphicsComponent.StartAnimation("playerRightStay");
}
else if (!isRight)
{
GraphicsComponent.StartAnimation("playerStayLeft");
}
}
}
if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer)

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,22 +71,8 @@ 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;