переписал костыльную программу тимофея по мак

This commit is contained in:
Lev 2023-08-18 15:31:22 +03:00
parent 76af78adc6
commit 0bedfaf39d
3 changed files with 10 additions and 18 deletions

View file

@ -3,7 +3,6 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -2,7 +2,6 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Windows.Forms;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection.Metadata; using System.Reflection.Metadata;
@ -17,13 +16,7 @@ namespace AnimationsFileCreator
Console.WriteLine("Добро пожаловать в костыльную программу по созданию файлов анимации для игры DungerousD"); Console.WriteLine("Добро пожаловать в костыльную программу по созданию файлов анимации для игры DungerousD");
Console.Write("Введите название текстуры (нажмите enter, чтобы выбрать файл во всплывающем окошке): "); Console.Write("Введите название текстуры (нажмите enter, чтобы выбрать файл во всплывающем окошке): ");
string textureName = Console.ReadLine(); string textureName = Console.ReadLine();
if (textureName == "")
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.ShowDialog();
textureName = dialog.FileName.Split('\\').Last();
textureName = textureName.Split('.')[0];
}
Console.WriteLine("Введите количество кадров анимации: "); Console.WriteLine("Введите количество кадров анимации: ");
int framesCount = int.Parse(Console.ReadLine()); int framesCount = int.Parse(Console.ReadLine());
Console.WriteLine("Введите длительность кадра в анимации: "); Console.WriteLine("Введите длительность кадра в анимации: ");

View file

@ -93,7 +93,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
{ {
if (a == "DeathFrom" + monsterName) if (a == "DeathFrom" + monsterName)
{ {
AppManager.Instance.ChangeGameState(GameState.Death); // AppManager.Instance.ChangeGameState(GameState.Death);
} }
}; };
} }
@ -101,10 +101,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
} }
public void Jump() public void Jump()
{ {
if (isOnGround) //if (isOnGround)
{ //{
velocity.Y = -11; velocity.Y = -11;
} //}
// здесь будет анимация // здесь будет анимация
} }
public void Shoot() public void Shoot()
@ -127,7 +127,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
foreach (var target in targets) foreach (var target in targets)
{ {
Zombie targetZombie = (Zombie)target; Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage(); // targetZombie.TakeDamage();
} }
} }
} }
@ -143,7 +143,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
foreach (var target in targets) foreach (var target in targets)
{ {
Zombie targetZombie = (Zombie)target; Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage(); // targetZombie.TakeDamage();
} }
} }
} }
@ -152,7 +152,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
} }
public override void Update(GameTime gameTime) public override void Update(GameTime gameTime)
{ {
GraphicsComponent.SetCameraPosition(Pos); // GraphicsComponent.SetCameraPosition(Pos);
if (!isAttacked) if (!isAttacked)
{ {
Move(gameTime); Move(gameTime);
@ -207,8 +207,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
} }
if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer)
{ {
NetworkTask task = new NetworkTask(id, Pos); //NetworkTask task = new NetworkTask(id, Pos);
AppManager.Instance.NetworkTasks.Add(task); //AppManager.Instance.NetworkTasks.Add(task);
} }
} }
public void MoveDown() public void MoveDown()