diff --git a/Assets/Build/Windows-DotNet-Tiny3D.buildsettings b/Assets/Build/Windows-DotNet-Tiny3D.buildsettings index 3ec640e..9c17c2c 100644 --- a/Assets/Build/Windows-DotNet-Tiny3D.buildsettings +++ b/Assets/Build/Windows-DotNet-Tiny3D.buildsettings @@ -10,7 +10,7 @@ "EnableBurst": true, "RootAssembly": "GlobalObjectId_V1-1-9c93346065c8be04c834bea5c41079be-5897886265953266890-0", "Target": "windows-dotnet", - "Configuration": 2, + "Configuration": 1, "Pipeline": "GlobalObjectId_V1-1-56241f83dacec1141b7d967eb30bf934-93214019566545601-0", "BeeTargetOverride": null }] diff --git a/Assets/Library.meta b/Assets/Library.meta new file mode 100644 index 0000000..f24d732 --- /dev/null +++ b/Assets/Library.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b13a01d4cb4f8ab45a1d84a9df7a7f24 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild.meta b/Assets/Library/DotsRuntimeBuild.meta new file mode 100644 index 0000000..d89e539 --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1af62a9708ff1d4f891dc1c74326a9b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts.meta b/Assets/Library/DotsRuntimeBuild/artifacts.meta new file mode 100644 index 0000000..ed457d1 --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da226643ac7ade1418dd686a7c7436cf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport.meta new file mode 100644 index 0000000..d1d04f7 --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d68a3517939cbc42be06805228e638b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath.meta new file mode 100644 index 0000000..384e7a1 --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f76e1431fd5c0c7458ef64a1afe7c9ca +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D.meta new file mode 100644 index 0000000..fb9752e --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 46083c6e8b5838c4196f3e825133855f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..674406d Binary files /dev/null and b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache.meta new file mode 100644 index 0000000..131771a --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/DesignTimeResolveAssemblyReferencesInput.cache.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 17ec83c07bc67c64385788b6b0ffbb82 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/TempPE.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/TempPE.meta new file mode 100644 index 0000000..2a6734d --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/TempPE.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ac974642c3f16904a82418de54ef7abb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache new file mode 100644 index 0000000..337304d Binary files /dev/null and b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache differ diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache.meta new file mode 100644 index 0000000..5676f25 --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Bee.CSharpSupport/MSBuildIntermediateOutputPath/Android-Tiny3D/Tiny3D.gen.csprojAssemblyReference.cache.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf2e234ac6de7ca4cb9503a966bc3d8c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll.meta new file mode 100644 index 0000000..3739a1c --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3d6a527bf3f37e14fad70a4f04e055d8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll/Android-Tiny3D.meta b/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll/Android-Tiny3D.meta new file mode 100644 index 0000000..688e44e --- /dev/null +++ b/Assets/Library/DotsRuntimeBuild/artifacts/Tiny3D.dll/Android-Tiny3D.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 207327f87ea03d040836586cb214fd3a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings b/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings new file mode 100644 index 0000000..b476dd8 Binary files /dev/null and b/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings differ diff --git a/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings.meta b/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings.meta new file mode 100644 index 0000000..6b82310 --- /dev/null +++ b/Assets/SceneDependencyCache/e7098c13cb0b98a3136c9246be4a580b.sceneWithBuildSettings.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e7098c13cb0b98a3136c9246be4a580b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/DOTS Subscene.unity b/Assets/Scenes/DOTS Subscene.unity index 6b19759..ba9f335 100644 --- a/Assets/Scenes/DOTS Subscene.unity +++ b/Assets/Scenes/DOTS Subscene.unity @@ -98,7 +98,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_UseShadowmask: 0 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -216,7 +216,6 @@ GameObject: m_Component: - component: {fileID: 285469726} - component: {fileID: 285469727} - - component: {fileID: 285469728} m_Layer: 0 m_Name: FirstRow_20 m_TagString: Untagged @@ -257,18 +256,6 @@ MonoBehaviour: z: 0 character: {fileID: 4678712600350111070, guid: 6bdce7e4307b98d429740e8cdcc7b3ec, type: 3} ---- !u!114 &285469728 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 285469725} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a61356ff9d9e1324595ea253cca75e08, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &594555747 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Components.meta b/Assets/Scripts/Components.meta new file mode 100644 index 0000000..7479ba5 --- /dev/null +++ b/Assets/Scripts/Components.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52c0c1cf87b427240abcbf799ff3298b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Confusion.cs b/Assets/Scripts/Components/Confusion.cs similarity index 100% rename from Assets/Scripts/Confusion.cs rename to Assets/Scripts/Components/Confusion.cs diff --git a/Assets/Scripts/Confusion.cs.meta b/Assets/Scripts/Components/Confusion.cs.meta similarity index 100% rename from Assets/Scripts/Confusion.cs.meta rename to Assets/Scripts/Components/Confusion.cs.meta diff --git a/Assets/Scripts/CubeMovementStatus.cs b/Assets/Scripts/Components/CubeMovementStatus.cs similarity index 100% rename from Assets/Scripts/CubeMovementStatus.cs rename to Assets/Scripts/Components/CubeMovementStatus.cs diff --git a/Assets/Scripts/CubeMovementStatus.cs.meta b/Assets/Scripts/Components/CubeMovementStatus.cs.meta similarity index 100% rename from Assets/Scripts/CubeMovementStatus.cs.meta rename to Assets/Scripts/Components/CubeMovementStatus.cs.meta diff --git a/Assets/Scripts/Dead.cs b/Assets/Scripts/Components/Dead.cs similarity index 100% rename from Assets/Scripts/Dead.cs rename to Assets/Scripts/Components/Dead.cs diff --git a/Assets/Scripts/Dead.cs.meta b/Assets/Scripts/Components/Dead.cs.meta similarity index 100% rename from Assets/Scripts/Dead.cs.meta rename to Assets/Scripts/Components/Dead.cs.meta diff --git a/Assets/Scripts/Digit.cs b/Assets/Scripts/Components/Digit.cs similarity index 100% rename from Assets/Scripts/Digit.cs rename to Assets/Scripts/Components/Digit.cs diff --git a/Assets/Scripts/Digit.cs.meta b/Assets/Scripts/Components/Digit.cs.meta similarity index 100% rename from Assets/Scripts/Digit.cs.meta rename to Assets/Scripts/Components/Digit.cs.meta diff --git a/Assets/Scripts/DigitCube.cs b/Assets/Scripts/Components/DigitCube.cs similarity index 100% rename from Assets/Scripts/DigitCube.cs rename to Assets/Scripts/Components/DigitCube.cs diff --git a/Assets/Scripts/DigitCube.cs.meta b/Assets/Scripts/Components/DigitCube.cs.meta similarity index 100% rename from Assets/Scripts/DigitCube.cs.meta rename to Assets/Scripts/Components/DigitCube.cs.meta diff --git a/Assets/Scripts/GameStatus.cs b/Assets/Scripts/Components/GameStatus.cs similarity index 100% rename from Assets/Scripts/GameStatus.cs rename to Assets/Scripts/Components/GameStatus.cs diff --git a/Assets/Scripts/GameStatus.cs.meta b/Assets/Scripts/Components/GameStatus.cs.meta similarity index 100% rename from Assets/Scripts/GameStatus.cs.meta rename to Assets/Scripts/Components/GameStatus.cs.meta diff --git a/Assets/Scripts/ObstacleTag.cs b/Assets/Scripts/Components/ObstacleTag.cs similarity index 100% rename from Assets/Scripts/ObstacleTag.cs rename to Assets/Scripts/Components/ObstacleTag.cs diff --git a/Assets/Scripts/ObstacleTag.cs.meta b/Assets/Scripts/Components/ObstacleTag.cs.meta similarity index 100% rename from Assets/Scripts/ObstacleTag.cs.meta rename to Assets/Scripts/Components/ObstacleTag.cs.meta diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Components/Player.cs similarity index 100% rename from Assets/Scripts/Player.cs rename to Assets/Scripts/Components/Player.cs diff --git a/Assets/Scripts/Player.cs.meta b/Assets/Scripts/Components/Player.cs.meta similarity index 100% rename from Assets/Scripts/Player.cs.meta rename to Assets/Scripts/Components/Player.cs.meta diff --git a/Assets/Scripts/PlayerInput.cs b/Assets/Scripts/Components/PlayerInput.cs similarity index 100% rename from Assets/Scripts/PlayerInput.cs rename to Assets/Scripts/Components/PlayerInput.cs diff --git a/Assets/Scripts/PlayerInput.cs.meta b/Assets/Scripts/Components/PlayerInput.cs.meta similarity index 100% rename from Assets/Scripts/PlayerInput.cs.meta rename to Assets/Scripts/Components/PlayerInput.cs.meta diff --git a/Assets/Scripts/PlayerPosition.cs b/Assets/Scripts/Components/PlayerPosition.cs similarity index 100% rename from Assets/Scripts/PlayerPosition.cs rename to Assets/Scripts/Components/PlayerPosition.cs diff --git a/Assets/Scripts/PlayerPosition.cs.meta b/Assets/Scripts/Components/PlayerPosition.cs.meta similarity index 100% rename from Assets/Scripts/PlayerPosition.cs.meta rename to Assets/Scripts/Components/PlayerPosition.cs.meta diff --git a/Assets/Scripts/Prefabs.cs b/Assets/Scripts/Components/Prefabs.cs similarity index 100% rename from Assets/Scripts/Prefabs.cs rename to Assets/Scripts/Components/Prefabs.cs diff --git a/Assets/Scripts/Prefabs.cs.meta b/Assets/Scripts/Components/Prefabs.cs.meta similarity index 100% rename from Assets/Scripts/Prefabs.cs.meta rename to Assets/Scripts/Components/Prefabs.cs.meta diff --git a/Assets/Scripts/Spawner.cs b/Assets/Scripts/Components/Spawner.cs similarity index 100% rename from Assets/Scripts/Spawner.cs rename to Assets/Scripts/Components/Spawner.cs diff --git a/Assets/Scripts/Spawner.cs.meta b/Assets/Scripts/Components/Spawner.cs.meta similarity index 100% rename from Assets/Scripts/Spawner.cs.meta rename to Assets/Scripts/Components/Spawner.cs.meta diff --git a/Assets/Scripts/TextRow.cs b/Assets/Scripts/Components/TextRow.cs similarity index 100% rename from Assets/Scripts/TextRow.cs rename to Assets/Scripts/Components/TextRow.cs diff --git a/Assets/Scripts/TextRow.cs.meta b/Assets/Scripts/Components/TextRow.cs.meta similarity index 100% rename from Assets/Scripts/TextRow.cs.meta rename to Assets/Scripts/Components/TextRow.cs.meta diff --git a/Assets/Scripts/MenuItem.cs b/Assets/Scripts/MenuItem.cs deleted file mode 100644 index 27a4562..0000000 --- a/Assets/Scripts/MenuItem.cs +++ /dev/null @@ -1,4 +0,0 @@ -using Unity.Entities; - -[GenerateAuthoringComponent] -public struct MenuItem : IComponentData{} diff --git a/Assets/Scripts/MenuItem.cs.meta b/Assets/Scripts/MenuItem.cs.meta deleted file mode 100644 index e6f9df8..0000000 --- a/Assets/Scripts/MenuItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a61356ff9d9e1324595ea253cca75e08 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Systems.meta b/Assets/Scripts/Systems.meta new file mode 100644 index 0000000..69cf06a --- /dev/null +++ b/Assets/Scripts/Systems.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 210f5236ca4f9ce46aa23bacdeeb8f73 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/CheckPlayerCollisionsSystem.cs b/Assets/Scripts/Systems/CheckPlayerCollisionsSystem.cs similarity index 100% rename from Assets/Scripts/CheckPlayerCollisionsSystem.cs rename to Assets/Scripts/Systems/CheckPlayerCollisionsSystem.cs diff --git a/Assets/Scripts/CheckPlayerCollisionsSystem.cs.meta b/Assets/Scripts/Systems/CheckPlayerCollisionsSystem.cs.meta similarity index 100% rename from Assets/Scripts/CheckPlayerCollisionsSystem.cs.meta rename to Assets/Scripts/Systems/CheckPlayerCollisionsSystem.cs.meta diff --git a/Assets/Scripts/ConfusionSystem.cs b/Assets/Scripts/Systems/ConfusionSystem.cs similarity index 100% rename from Assets/Scripts/ConfusionSystem.cs rename to Assets/Scripts/Systems/ConfusionSystem.cs diff --git a/Assets/Scripts/ConfusionSystem.cs.meta b/Assets/Scripts/Systems/ConfusionSystem.cs.meta similarity index 100% rename from Assets/Scripts/ConfusionSystem.cs.meta rename to Assets/Scripts/Systems/ConfusionSystem.cs.meta diff --git a/Assets/Scripts/DeathSystem.cs b/Assets/Scripts/Systems/DeathSystem.cs similarity index 100% rename from Assets/Scripts/DeathSystem.cs rename to Assets/Scripts/Systems/DeathSystem.cs diff --git a/Assets/Scripts/DeathSystem.cs.meta b/Assets/Scripts/Systems/DeathSystem.cs.meta similarity index 100% rename from Assets/Scripts/DeathSystem.cs.meta rename to Assets/Scripts/Systems/DeathSystem.cs.meta diff --git a/Assets/Scripts/DigitCubeSystem.cs b/Assets/Scripts/Systems/DigitCubeSystem.cs similarity index 100% rename from Assets/Scripts/DigitCubeSystem.cs rename to Assets/Scripts/Systems/DigitCubeSystem.cs diff --git a/Assets/Scripts/DigitCubeSystem.cs.meta b/Assets/Scripts/Systems/DigitCubeSystem.cs.meta similarity index 100% rename from Assets/Scripts/DigitCubeSystem.cs.meta rename to Assets/Scripts/Systems/DigitCubeSystem.cs.meta diff --git a/Assets/Scripts/DigitNumberSystem.cs b/Assets/Scripts/Systems/DigitNumberSystem.cs similarity index 100% rename from Assets/Scripts/DigitNumberSystem.cs rename to Assets/Scripts/Systems/DigitNumberSystem.cs diff --git a/Assets/Scripts/DigitNumberSystem.cs.meta b/Assets/Scripts/Systems/DigitNumberSystem.cs.meta similarity index 100% rename from Assets/Scripts/DigitNumberSystem.cs.meta rename to Assets/Scripts/Systems/DigitNumberSystem.cs.meta diff --git a/Assets/Scripts/FollowPlayerSystem.cs b/Assets/Scripts/Systems/FollowPlayerSystem.cs similarity index 78% rename from Assets/Scripts/FollowPlayerSystem.cs rename to Assets/Scripts/Systems/FollowPlayerSystem.cs index 1002852..b8a99ef 100644 --- a/Assets/Scripts/FollowPlayerSystem.cs +++ b/Assets/Scripts/Systems/FollowPlayerSystem.cs @@ -1,12 +1,9 @@ using Unity.Entities; using Unity.Jobs; using Unity.Mathematics; -using Unity.Transforms; -#if UNITY_DOTSPLAYER using Unity.Tiny.Rendering; -using Unity.Tiny.Input; +using Unity.Transforms; -#endif [AlwaysSynchronizeSystem] public class FollowPlayerSystem : ComponentSystem { @@ -17,19 +14,24 @@ protected override void OnUpdate() var deltaTime = Time.DeltaTime; var cameraPos = new float3(0, 0, 0); var playerPos = new float3(0, 0, 0); + Entities.WithAll().ForEach((ref Translation translation) => { -#if UNITY_DOTSPLAYER var cameraEntity = GetSingletonEntity(); cameraPos = EntityManager.GetComponentData(cameraEntity).Value; EntityManager.SetComponentData(cameraEntity, new Translation { Value = math.lerp(cameraPos, translation.Value + offset, deltaTime * followSpeed) }); -#else - cameraPos = UnityEngine.Camera.main.transform.position; - cameraPos = math.lerp(cameraPos, translation.Value + offset, deltaTime * followSpeed); -#endif playerPos = translation.Value; }); + //NOT WORKING! -> can't change the background color at runtime :( + //Entities.ForEach((ref Camera cam) => + //{ + // cam.backgroundColor.r = 0; + // cam.backgroundColor.g = 0; + // cam.backgroundColor.b = 0; + // cam.backgroundColor.Value = new float4(0, 0, 0, 0); + //}); + //let the ui follow the player Entities.ForEach((ref Translation translation, ref Digit d) => { diff --git a/Assets/Scripts/FollowPlayerSystem.cs.meta b/Assets/Scripts/Systems/FollowPlayerSystem.cs.meta similarity index 100% rename from Assets/Scripts/FollowPlayerSystem.cs.meta rename to Assets/Scripts/Systems/FollowPlayerSystem.cs.meta diff --git a/Assets/Scripts/GameOver.cs b/Assets/Scripts/Systems/GameOver.cs similarity index 100% rename from Assets/Scripts/GameOver.cs rename to Assets/Scripts/Systems/GameOver.cs diff --git a/Assets/Scripts/GameOver.cs.meta b/Assets/Scripts/Systems/GameOver.cs.meta similarity index 100% rename from Assets/Scripts/GameOver.cs.meta rename to Assets/Scripts/Systems/GameOver.cs.meta diff --git a/Assets/Scripts/GameStatusSystem.cs b/Assets/Scripts/Systems/GameStatusSystem.cs similarity index 100% rename from Assets/Scripts/GameStatusSystem.cs rename to Assets/Scripts/Systems/GameStatusSystem.cs diff --git a/Assets/Scripts/GameStatusSystem.cs.meta b/Assets/Scripts/Systems/GameStatusSystem.cs.meta similarity index 100% rename from Assets/Scripts/GameStatusSystem.cs.meta rename to Assets/Scripts/Systems/GameStatusSystem.cs.meta diff --git a/Assets/Scripts/InputShow.cs b/Assets/Scripts/Systems/InputShow.cs similarity index 100% rename from Assets/Scripts/InputShow.cs rename to Assets/Scripts/Systems/InputShow.cs diff --git a/Assets/Scripts/InputShow.cs.meta b/Assets/Scripts/Systems/InputShow.cs.meta similarity index 100% rename from Assets/Scripts/InputShow.cs.meta rename to Assets/Scripts/Systems/InputShow.cs.meta diff --git a/Assets/Scripts/MenuSpawner.cs b/Assets/Scripts/Systems/MenuSpawner.cs similarity index 100% rename from Assets/Scripts/MenuSpawner.cs rename to Assets/Scripts/Systems/MenuSpawner.cs diff --git a/Assets/Scripts/MenuSpawner.cs.meta b/Assets/Scripts/Systems/MenuSpawner.cs.meta similarity index 100% rename from Assets/Scripts/MenuSpawner.cs.meta rename to Assets/Scripts/Systems/MenuSpawner.cs.meta diff --git a/Assets/Scripts/ObstacleMovementSystem.cs b/Assets/Scripts/Systems/ObstacleMovementSystem.cs similarity index 100% rename from Assets/Scripts/ObstacleMovementSystem.cs rename to Assets/Scripts/Systems/ObstacleMovementSystem.cs diff --git a/Assets/Scripts/ObstacleMovementSystem.cs.meta b/Assets/Scripts/Systems/ObstacleMovementSystem.cs.meta similarity index 100% rename from Assets/Scripts/ObstacleMovementSystem.cs.meta rename to Assets/Scripts/Systems/ObstacleMovementSystem.cs.meta diff --git a/Assets/Scripts/PlayerSystem.cs b/Assets/Scripts/Systems/PlayerSystem.cs similarity index 100% rename from Assets/Scripts/PlayerSystem.cs rename to Assets/Scripts/Systems/PlayerSystem.cs diff --git a/Assets/Scripts/PlayerSystem.cs.meta b/Assets/Scripts/Systems/PlayerSystem.cs.meta similarity index 100% rename from Assets/Scripts/PlayerSystem.cs.meta rename to Assets/Scripts/Systems/PlayerSystem.cs.meta diff --git a/Assets/Scripts/SpawnerSystem_FromEntity.cs b/Assets/Scripts/Systems/SpawnerSystem_FromEntity.cs similarity index 96% rename from Assets/Scripts/SpawnerSystem_FromEntity.cs rename to Assets/Scripts/Systems/SpawnerSystem_FromEntity.cs index 25d795f..c22e2b3 100644 --- a/Assets/Scripts/SpawnerSystem_FromEntity.cs +++ b/Assets/Scripts/Systems/SpawnerSystem_FromEntity.cs @@ -41,8 +41,8 @@ protected override JobHandle OnUpdate(JobHandle inputDeps) // The actual job will be cached once it is compiled (it will only get Burst compiled once). var jobHandle = Entities .WithName("Spawner") - //.WithBurst(FloatMode.Default, FloatPrecision.Standard, true) - .WithoutBurst() + .WithBurst(FloatMode.Default, FloatPrecision.Standard, true) + //.WithoutBurst() .ForEach((Entity entity, int entityInQueryIndex, in Spawner spawnerFromEntity, in LocalToWorld location) => { for (var x = -spawnerFromEntity.CountX; x < spawnerFromEntity.CountX; x++) @@ -54,7 +54,7 @@ protected override JobHandle OnUpdate(JobHandle inputDeps) // Place the instantiated in a grid with some noise var position = math.transform(location.Value, - new float3(x, y, (noise.cnoise(new float2(x, y + (float)elapsedT + 9) * 0.21F) + 0.2) > 0 ? -100 : 0)); + new float3(x, y, (noise.cnoise(new float2(x, y + (float)elapsedT + 9) * 0.21F) + 0.22) > 0 ? -100 : 0)); commandBuffer.SetComponent(entityInQueryIndex, instance, new Translation {Value = position}); commandBuffer.SetComponent(entityInQueryIndex, instance, new ObstacleTag {StartTime = elapsedT + 9, startPos = position, MovementSpeed = 5, Swapped = true}); } diff --git a/Assets/Scripts/SpawnerSystem_FromEntity.cs.meta b/Assets/Scripts/Systems/SpawnerSystem_FromEntity.cs.meta similarity index 100% rename from Assets/Scripts/SpawnerSystem_FromEntity.cs.meta rename to Assets/Scripts/Systems/SpawnerSystem_FromEntity.cs.meta