Bug fixes with Bats and other NPCs. Also modified map generator flood fill algorithm.

This commit is contained in:
Jakub Sztuba 2022-12-16 14:03:23 +01:00
parent dd1e87bdab
commit b53bdf3bd9
9 changed files with 107 additions and 278 deletions

View File

@ -2,8 +2,10 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<CscToolPath>C:\Program Files\Unity\Hub\Editor\2020.3.32f1\Editor\Data\Tools\RoslynScripts</CscToolPath> <_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package</_TargetFrameworkDirectories>
<CscToolExe>unity_csc.bat</CscToolExe> <_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package</_FullFrameworkReferenceAssemblyPaths>
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -11,7 +13,8 @@
<ProductVersion>10.0.20506</ProductVersion> <ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace> <RootNamespace></RootNamespace>
<ProjectGuid>{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}</ProjectGuid> <ProjectGuid>{e0f48af5-6d3e-b154-523d-8f755dc8e665}</ProjectGuid>
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Assembly-CSharp</AssemblyName> <AssemblyName>Assembly-CSharp</AssemblyName>
@ -27,8 +30,9 @@
<DefineConstants>DEBUG;TRACE;UNITY_2020_3_32;UNITY_2020_3;UNITY_2020;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;USE_SEARCH_ENGINE_API;SCENE_TEMPLATE_MODULE;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_MONO_BDWGC;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;PLATFORM_STANDALONE;PLATFORM_STANDALONE_WIN;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_STANDARD_2_0;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants> <DefineConstants>DEBUG;TRACE;UNITY_2020_3_32;UNITY_2020_3;UNITY_2020;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;USE_SEARCH_ENGINE_API;SCENE_TEMPLATE_MODULE;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_MONO_BDWGC;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;PLATFORM_STANDALONE;PLATFORM_STANDALONE_WIN;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_STANDARD_2_0;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn> <NoWarn></NoWarn>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -36,8 +40,9 @@
<OutputPath>Temp\bin\Release\</OutputPath> <OutputPath>Temp\bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn> <NoWarn></NoWarn>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<NoConfig>true</NoConfig> <NoConfig>true</NoConfig>
@ -163,6 +168,7 @@
<Compile Include="Assets\Scripts\REFACTORING\Domain\Enum\NPCStateEnum.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Domain\Enum\NPCStateEnum.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Buildable\SceneObjectBuilderInterface.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Buildable\SceneObjectBuilderInterface.cs" />
<Compile Include="Assets\Scripts\SceneManager\Teleports\Gateway.cs" /> <Compile Include="Assets\Scripts\SceneManager\Teleports\Gateway.cs" />
<Compile Include="Assets\DamageDealingPlant.cs" />
<Compile Include="Assets\Scripts\FloatValue.cs" /> <Compile Include="Assets\Scripts\FloatValue.cs" />
<Compile Include="Assets\_\Stuff\GridPathfinding\LastMoveTo.cs" /> <Compile Include="Assets\_\Stuff\GridPathfinding\LastMoveTo.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveItem\SaveEquitableItemSystem.cs" /> <Compile Include="Assets\Scripts\SceneManager\SaveItem\SaveEquitableItemSystem.cs" />
@ -815,94 +821,94 @@
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.3.32f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll</HintPath> <HintPath>C:/Program Files/Unity/Hub/Editor/2020.3.32f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Animation.Editor"> <Reference Include="Unity.2D.Animation.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.InternalAPIEngineBridge.001"> <Reference Include="Unity.InternalAPIEngineBridge.001">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.VSCode.Editor"> <Reference Include="Unity.VSCode.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.PixelPerfect"> <Reference Include="Unity.2D.PixelPerfect">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Tilemap.Editor"> <Reference Include="Unity.2D.Tilemap.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="PsdPlugin"> <Reference Include="PsdPlugin">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.TextMeshPro.Editor"> <Reference Include="Unity.TextMeshPro.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.VisualStudio.Editor"> <Reference Include="Unity.VisualStudio.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.Timeline"> <Reference Include="Unity.Timeline">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.TextMeshPro"> <Reference Include="Unity.TextMeshPro">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.IK.Editor"> <Reference Include="Unity.2D.IK.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Sprite.Editor"> <Reference Include="Unity.2D.Sprite.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Psdimporter.Editor"> <Reference Include="Unity.2D.Psdimporter.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Path.Editor"> <Reference Include="Unity.2D.Path.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.InternalAPIEditorBridge.001"> <Reference Include="Unity.InternalAPIEditorBridge.001">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEditor.UI"> <Reference Include="UnityEditor.UI">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.PlasticSCM.Editor"> <Reference Include="Unity.PlasticSCM.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.Rider.Editor"> <Reference Include="Unity.Rider.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.UI"> <Reference Include="UnityEngine.UI">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.Mathematics"> <Reference Include="Unity.Mathematics">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.IK.Runtime"> <Reference Include="Unity.2D.IK.Runtime">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Animation.Triangle.Runtime"> <Reference Include="Unity.2D.Animation.Triangle.Runtime">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Animation.Runtime"> <Reference Include="Unity.2D.Animation.Runtime">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.PixelPerfect.Editor"> <Reference Include="Unity.2D.PixelPerfect.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.Timeline.Editor"> <Reference Include="Unity.Timeline.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.Mathematics.Editor"> <Reference Include="Unity.Mathematics.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Common.Runtime"> <Reference Include="Unity.2D.Common.Runtime">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.SpriteShape.Editor"> <Reference Include="Unity.2D.SpriteShape.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.Common.Editor"> <Reference Include="Unity.2D.Common.Editor">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll</HintPath>
</Reference> </Reference>
<Reference Include="Unity.2D.SpriteShape.Runtime"> <Reference Include="Unity.2D.SpriteShape.Runtime">
<HintPath>C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath> <HintPath>C:/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -186,31 +186,31 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 88d05133b4682194e90a88b0f3c16b70, type: 3} m_Script: {fileID: 11500000, guid: 88d05133b4682194e90a88b0f3c16b70, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
moveSpeed: 0 moveSpeed: 2
enemyName: enemyName:
maxHealth: {fileID: 0} maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2}
health: 0 health: 0
baseAttack: 0 baseAttack: 1
target: {fileID: 0} target: {fileID: 4869648843286970699, guid: 4cb7163e44af59f4c9350005c199db3c, type: 3}
chaseRadius: 0 chaseRadius: 6
attackRadius: 0 attackRadius: 1
homePosition: {fileID: 0} homePosition: {fileID: 0}
speed: 0 speed: 2
shouldRotate: 0 shouldRotate: 0
dir: {x: 0, y: 0, z: 0} dir: {x: 0, y: 0, z: 0}
whatisplayer: whatisplayer:
serializedVersion: 2 serializedVersion: 2
m_Bits: 0 m_Bits: 0
roundingDistance: 0 roundingDistance: 0
anim: {fileID: 0} anim: {fileID: 4006076606190978598}
other: {fileID: 0} other: {fileID: 0}
inRange: 0 inRange: 0
hit: 0 hit: 0
player: {fileID: 0} player: {fileID: 4869648843286970700, guid: 4cb7163e44af59f4c9350005c199db3c, type: 3}
thrust: 0 thrust: 0
knockTime: 0 knockTime: 0
isKilled: 0 isKilled: 0
isKilled2: 0 isKilled2: 0
isPanelEnabled: 1 isPanelEnabled: 1
expValue: 0 expValue: 2
agent: {fileID: 0} agent: {fileID: -5618304694998678869}

File diff suppressed because it is too large Load Diff

View File

@ -38,6 +38,7 @@ public class AStarPathfindingAgent : MonoBehaviour
public void FindPath() public void FindPath()
{ {
Pathfinder.FindPath(transform.position,Pathfinder.Player.position, this); Pathfinder.FindPath(transform.position,Pathfinder.Player.position, this);
} }
public IEnumerator FollowPath() public IEnumerator FollowPath()
@ -58,7 +59,8 @@ public class AStarPathfindingAgent : MonoBehaviour
while (true) while (true)
{ {
currentWorldPosition = transform.position; currentWorldPosition = transform.position;
if (transform.position == currentWaypoint.worldPosition) //if (transform.position == currentWaypoint.worldPosition)
if (Vector3.Distance(transform.position, currentWaypoint.worldPosition)<0.01f)
{ {
targetIndex++; targetIndex++;
bool reachedPosition = targetIndex >= path.Count; bool reachedPosition = targetIndex >= path.Count;
@ -81,6 +83,7 @@ public class AStarPathfindingAgent : MonoBehaviour
myAnim.SetBool("Left", false); myAnim.SetBool("Left", false);
} }
transform.position = Vector3.MoveTowards(current, target, speed * Time.deltaTime); transform.position = Vector3.MoveTowards(current, target, speed * Time.deltaTime);
Debug.Log(current + "target:" + target);
yield return null; yield return null;
} }
} }

View File

@ -15,7 +15,7 @@ public class NodeMap : MonoBehaviour
public Tilemap tilemap; public Tilemap tilemap;
// Start is called before the first frame update // Start is called before the first frame update
void Awake() void Start()
{ {
DataFromTiles = new Dictionary<TileBase, TileData>(); DataFromTiles = new Dictionary<TileBase, TileData>();
foreach (var tileData in TileDatas) foreach (var tileData in TileDatas)
@ -118,7 +118,7 @@ public class NodeMap : MonoBehaviour
public Vector3 GetWorldPosition(Vector2Int position) public Vector3 GetWorldPosition(Vector2Int position)
{ {
Vector3 worldBottomLeft = transform.position - (Vector3.right * mapSize.x / 2) - (Vector3.up * (mapSize.y/ 2)); Vector3 worldBottomLeft = transform.position - (Vector3.right * (mapSize.x / 2)) - (Vector3.up * (mapSize.y / 2));
Vector3 worldPoint = worldBottomLeft + (Vector3.right * position.x) + (Vector3.up * position.y); Vector3 worldPoint = worldBottomLeft + (Vector3.right * position.x) + (Vector3.up * position.y);
Vector3 cellSizeOffset = new Vector3(cellSize / 2, cellSize / 2, 0); Vector3 cellSizeOffset = new Vector3(cellSize / 2, cellSize / 2, 0);
return worldPoint * cellSize + cellSizeOffset; return worldPoint * cellSize + cellSizeOffset;

View File

@ -37,5 +37,4 @@ MonoBehaviour:
- {fileID: 11400000, guid: 4f93b992f96f0fe448df379f0b2d3565, type: 2} - {fileID: 11400000, guid: 4f93b992f96f0fe448df379f0b2d3565, type: 2}
- {fileID: 11400000, guid: 00611fa507c2a2d478a9e57097e8b16d, type: 2} - {fileID: 11400000, guid: 00611fa507c2a2d478a9e57097e8b16d, type: 2}
- {fileID: 11400000, guid: 9596769ea6df4414696f628c2fc44ca8, type: 2} - {fileID: 11400000, guid: 9596769ea6df4414696f628c2fc44ca8, type: 2}
- {fileID: 11400000, guid: 9596769ea6df4414696f628c2fc44ca8, type: 2}
walkable: 1 walkable: 1

View File

@ -1,9 +1,11 @@
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using GUI_Scripts.ProceduralGeneration; using GUI_Scripts.ProceduralGeneration;
using UnityEngine; using UnityEngine;
using UnityEngine.Tilemaps; using UnityEngine.Tilemaps;
using Random = UnityEngine.Random;
public class TileMapGenerator : MonoBehaviour public class TileMapGenerator : MonoBehaviour
{ {
@ -13,7 +15,16 @@ public class TileMapGenerator : MonoBehaviour
public Tile ground1, wall1; public Tile ground1, wall1;
public Graph graph; public Graph graph;
void Start() private void Start()
{
while (!Generate())
{
}
}
bool Generate()
{ {
Map map = new Map(new Vector2Int(100, 100)); Map map = new Map(new Vector2Int(100, 100));
List<FloodFill> fillers = new List<FloodFill>(); List<FloodFill> fillers = new List<FloodFill>();
@ -53,6 +64,11 @@ public class TileMapGenerator : MonoBehaviour
} }
if (graph.graphNodes.Count > count * 0.8)
{
return false;
}
foreach (var filler in fillers) foreach (var filler in fillers)
{ {
int id = filler.id; int id = filler.id;
@ -65,16 +81,19 @@ public class TileMapGenerator : MonoBehaviour
} }
else if (id == 2) else if (id == 2)
{ {
ground.SetTile(new Vector3Int(pos.x,pos.y,0), wall1); walls.SetTile(new Vector3Int(pos.x,pos.y,0), wall1);
} }
} }
} }
GraphNode playerPosStart = graph.graphNodes[Random.Range(0, graph.graphNodes.Count)]; GraphNode playerPosStart = graph.graphNodes[Random.Range(0, graph.graphNodes.Count)];
Vector2Int startPos = playerPosStart.positions.ElementAt(Random.Range(0, playerPosStart.positions.Count)); Vector2Int startPos = playerPosStart.positions.ElementAt(Random.Range(0, playerPosStart.positions.Count));
Debug.Log(startPos); Debug.Log(startPos);
return true;
} }
// Update is called once per frame // Update is called once per frame

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{e0f48af5-6d3e-b154-523d-8f755dc8e665}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -9,10 +9,10 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {e0f48af5-6d3e-b154-523d-8f755dc8e665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}.Debug|Any CPU.Build.0 = Debug|Any CPU {e0f48af5-6d3e-b154-523d-8f755dc8e665}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}.Release|Any CPU.ActiveCfg = Release|Any CPU {e0f48af5-6d3e-b154-523d-8f755dc8e665}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F58AF4E0-3E6D-54B1-523D-8F755DC8E665}.Release|Any CPU.Build.0 = Release|Any CPU {e0f48af5-6d3e-b154-523d-8f755dc8e665}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -15,25 +15,25 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
flags: 0 flags: 0
RecentlyUsedScenePath-3: RecentlyUsedScenePath-3:
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d value: 22424703114646680e0b0227036c71150130192729686b700e261335ebf23939f6ee39e7a92f31352d1b
flags: 0 flags: 0
RecentlyUsedScenePath-4: RecentlyUsedScenePath-4:
value: 22424703114646680e0b0227036c70050204112e291f2f2a2c3b1920caef212be7a923e7ee2e26 value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
flags: 0 flags: 0
RecentlyUsedScenePath-5: RecentlyUsedScenePath-5:
value: 22424703114646680e0b0227036c68190c160a2e042733232867083debf42d value: 22424703114646680e0b0227036c68190c160a2e042733232867083debf42d
flags: 0 flags: 0
RecentlyUsedScenePath-6: RecentlyUsedScenePath-6:
value: 22424703114646680e0b0227036c761e1821112620292135633c133af6f9 value: 22424703114646680e0b0227036c70050204112e291f2f2a2c3b1920caef212be7a923e7ee2e26
flags: 0 flags: 0
RecentlyUsedScenePath-7: RecentlyUsedScenePath-7:
value: 22424703114646680e0b0227036c7c151b12163e2d3a3f7e38271427fb value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
flags: 0 flags: 0
RecentlyUsedScenePath-8: RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c7b0518101d252266333e243d04 value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
flags: 0 flags: 0
RecentlyUsedScenePath-9: RecentlyUsedScenePath-9:
value: 22424703114646680e0b0227036c791904040c1c25242a312a2c5326ece92021 value: 22424703114646680e0b0227036c7b0518101d252266333e243d04
flags: 0 flags: 0
vcSharedLogLevel: vcSharedLogLevel:
value: 0d5e400f0650 value: 0d5e400f0650