FixPathCommit

This commit is contained in:
AnloGames 2024-08-20 01:02:26 +03:00
parent 68ab2a4498
commit a8072cfa67
4 changed files with 5 additions and 4 deletions

View file

@ -75,7 +75,7 @@ namespace ZoFo.GameCore.GameManagers.MapManager
(i / chunk.Height) * tileMap.TileHeight + chunk.Y * tileMap.TileHeight); (i / chunk.Height) * tileMap.TileHeight + chunk.Y * tileMap.TileHeight);
Tile tile = tileSet.Tiles[number]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile Tile tile = tileSet.Tiles[number]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile
string textureName = Path.Combine(AppContext.BaseDirectory, "Content", "Textures", "TileSetImages", string textureName = Path.Combine("Content", "Textures", "TileSetImages",
Path.GetFileName(tileSet.Image).Replace(".png", "")); Path.GetFileName(tileSet.Image).Replace(".png", ""));
switch (tile.Type) switch (tile.Type)
{ {

View file

@ -190,7 +190,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
public void JoinRoom(string ip, int port) // multyplayer public void JoinRoom(string ip, int port) // multyplayer
{ {
sendingEP = new IPEndPoint(IPAddress.Parse(ip), port); sendingEP = new IPEndPoint(IPAddress.Parse(ip), port);
AppManager.Instance.ChangeState(GameState.ClientPlaying);
SendData(); SendData();
Thread listen = new Thread(StartListening); Thread listen = new Thread(StartListening);
listen.IsBackground = true; listen.IsBackground = true;

View file

@ -13,7 +13,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
class Ammo:Collectable class Ammo:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("Textures/icons/8"); public override StaticGraphicsComponent graphicsComponent { get; } = new("Content/Textures/icons/8");
public Ammo(Vector2 position) : base(position) public Ammo(Vector2 position) : base(position)
{ {
graphicsComponent.ObjectDrawRectangle.Width = 20; graphicsComponent.ObjectDrawRectangle.Width = 20;

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
@ -37,7 +38,7 @@ namespace ZoFo.GameCore.Graphics
return; return;
} }
texture = AppManager.Instance.Content.Load<Texture2D>(_textureName); texture = AppManager.Instance.Content.Load<Texture2D>(Path.Combine(AppContext.BaseDirectory, _textureName));
} }
public override void Update() public override void Update()