fix conflicts
This commit is contained in:
commit
0640be52da
8 changed files with 79 additions and 78 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ obj
|
|||
.vs
|
||||
.idea
|
||||
DangerousD.sln.DotSettings.user
|
||||
.DS_Store
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
|
@ -17,13 +16,7 @@ namespace AnimationsFileCreator
|
|||
Console.WriteLine("Добро пожаловать в костыльную программу по созданию файлов анимации для игры DungerousD");
|
||||
Console.Write("Введите название текстуры (нажмите enter, чтобы выбрать файл во всплывающем окошке): ");
|
||||
string textureName = Console.ReadLine();
|
||||
if (textureName == "")
|
||||
{
|
||||
OpenFileDialog dialog = new OpenFileDialog();
|
||||
dialog.ShowDialog();
|
||||
textureName = dialog.FileName.Split('\\').Last();
|
||||
textureName = textureName.Split('.')[0];
|
||||
}
|
||||
|
||||
Console.WriteLine("Введите количество кадров анимации: ");
|
||||
int framesCount = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine("Введите длительность кадра в анимации: ");
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#begin ButtonFont.spritefont
|
||||
/importer:FontDescriptionImporter
|
||||
/processor:FontDescriptionProcessor
|
||||
<<<<<<< HEAD
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:TextureFormat=Compressed
|
||||
/build:ButtonFont.spritefont
|
||||
|
@ -56,6 +57,11 @@
|
|||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:checkboxs_on.png
|
||||
=======
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:TextureFormat=Compressed
|
||||
/build:ButtonFont.spritefont
|
||||
>>>>>>> Diamond
|
||||
|
||||
#begin deathAnimation.png
|
||||
/importer:TextureImporter
|
||||
|
@ -69,6 +75,7 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:deathAnimation.png
|
||||
|
||||
<<<<<<< HEAD
|
||||
#begin deathBackground.jpg
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -82,6 +89,8 @@
|
|||
/build:deathBackground.jpg
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> Diamond
|
||||
#begin DoomTestSong.mp3
|
||||
/importer:Mp3Importer
|
||||
/processor:SoundEffectProcessor
|
||||
|
@ -141,6 +150,7 @@
|
|||
/build:menuFon.jpg
|
||||
|
||||
#begin MenuFon2.jpg
|
||||
<<<<<<< HEAD
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
|
@ -165,6 +175,8 @@
|
|||
/build:menuFon3.jpg
|
||||
|
||||
#begin MonstersAnimations.png
|
||||
=======
|
||||
>>>>>>> Diamond
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
|
@ -174,9 +186,15 @@
|
|||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
<<<<<<< HEAD
|
||||
/build:MonstersAnimations.png
|
||||
|
||||
#begin optionsBackground.jpg
|
||||
=======
|
||||
/build:MenuFon2.jpg
|
||||
|
||||
#begin menuFon3.jpg
|
||||
>>>>>>> Diamond
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
|
@ -186,9 +204,15 @@
|
|||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
<<<<<<< HEAD
|
||||
/build:optionsBackground.jpg
|
||||
|
||||
#begin PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png
|
||||
=======
|
||||
/build:menuFon3.jpg
|
||||
|
||||
#begin MonstersAnimations.png
|
||||
>>>>>>> Diamond
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
|
@ -198,9 +222,15 @@
|
|||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
<<<<<<< HEAD
|
||||
/build:PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png
|
||||
|
||||
#begin playerAnimation.png
|
||||
=======
|
||||
/build:MonstersAnimations.png
|
||||
|
||||
#begin spriteDiamond.png
|
||||
>>>>>>> Diamond
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
|
@ -210,6 +240,7 @@
|
|||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
<<<<<<< HEAD
|
||||
/build:playerAnimation.png
|
||||
|
||||
#begin slider.png
|
||||
|
@ -307,6 +338,9 @@
|
|||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:textboxbackground6-1.png
|
||||
=======
|
||||
/build:spriteDiamond.png
|
||||
>>>>>>> Diamond
|
||||
|
||||
#begin tiles.png
|
||||
/importer:TextureImporter
|
||||
|
|
1
DangerousD/Content/animations/diamondAnimation
Normal file
1
DangerousD/Content/animations/diamondAnimation
Normal file
|
@ -0,0 +1 @@
|
|||
{"id":"diamondAnimation","textureName":"spriteDiamond","startSpriteRectangle":{"X":0,"Y":0,"Width":512,"Height":420},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":8,"isCycle":true,"offset":"0, 0"}
|
BIN
DangerousD/Content/spriteDiamond.png
Normal file
BIN
DangerousD/Content/spriteDiamond.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
28
DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs
Normal file
28
DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DangerousD.GameCore.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace DangerousD.GameCore.GameObjects.LivingEntities
|
||||
{
|
||||
public class Diamond : Entity
|
||||
{
|
||||
|
||||
protected override GraphicsComponent GraphicsComponent { get; } = new GraphicsComponent(new List<string>() { "spriteDiamond" }, "spriteDiamond");
|
||||
|
||||
public Diamond(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void Update(Player player)
|
||||
{
|
||||
if (Rectangle.Intersects(player.Rectangle))
|
||||
{
|
||||
player.score++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -108,9 +108,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
(attackRect.Y - GraphicsComponent.CameraPosition.Y) * GraphicsComponent.scaling,
|
||||
attackRect.Width * GraphicsComponent.scaling,
|
||||
attackRect.Height * GraphicsComponent.scaling), Color.White);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void Death(string monsterName)
|
||||
{
|
||||
if (AppManager.Instance.InputManager.InvincibilityCheat)
|
||||
|
@ -190,73 +192,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
{
|
||||
Zombie targetZombie = (Zombie)targets.First();
|
||||
targetZombie.TakeDamage();
|
||||
|
||||
}
|
||||
targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(GetShootRectangle(isRight), typeof(SilasHands)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
||||
if (targets.Count() > 0)
|
||||
{
|
||||
SilasHands targetHand = (SilasHands)targets.First();
|
||||
targetHand.TakeDamage();
|
||||
}
|
||||
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 30, Pos.Y + 7));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCicycleAnimation("playerShootLeft");
|
||||
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(GetShootRectangle(isRight), typeof(Zombie));
|
||||
if (targets != null)
|
||||
{
|
||||
foreach (var target in targets)
|
||||
{
|
||||
Zombie targetZombie = (Zombie)target;
|
||||
targetZombie.TakeDamage();
|
||||
}
|
||||
}
|
||||
targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(GetShootRectangle(isRight), typeof(SilasHands));
|
||||
if (targets.Count() > 0)
|
||||
{
|
||||
SilasHands targetHand = (SilasHands)targets.First();
|
||||
targetHand.TakeDamage();
|
||||
}
|
||||
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y + 7));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (AppManager.Instance.InputManager.ScopeState == ScopeState.Up)
|
||||
{
|
||||
isUping = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUping = false;
|
||||
}
|
||||
if (isOnGround && FallingThroughPlatform)
|
||||
{
|
||||
FallingThroughPlatform = false;
|
||||
}
|
||||
GraphicsComponent.SetCameraPosition(Pos);
|
||||
if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat)
|
||||
{
|
||||
if (!isShooting)
|
||||
{
|
||||
Move(gameTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = 0;
|
||||
}
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Move(GameTime gameTime)
|
||||
{
|
||||
|
@ -311,4 +254,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
isOnGround = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue