diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..2053c39 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,2 @@ +[build] +rustflags = ["-C", "link-arg=-fuse-ld=lld", "-C", "target-cpu=native"] \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8af868e..e8071ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,60 +1,20 @@ -# This .gitignore file should be placed at the root of your Unity project directory -# -# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore -# -/[Ll]ibrary/ -/[Tt]emp/ -/[Oo]bj/ -/[Bb]uild/ -/[Bb]uilds/ -/[Ll]ogs/ -/[Mm]emoryCaptures/ -# Asset meta data should only be ignored when the corresponding asset is also ignored -!/[Aa]ssets/**/*.meta +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ -# Uncomment this line if you wish to ignore the asset store tools plugin -# /[Aa]ssets/AssetStoreTools* +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock -# Autogenerated Jetbrains Rider plugin -[Aa]ssets/Plugins/Editor/JetBrains* +# These are backup files generated by rustfmt +**/*.rs.bk -# Visual Studio cache directory -.vs/ - -# Gradle cache directory -.gradle/ - -# Autogenerated VS/MD/Consulo solution and project files -ExportedObj/ -.consulo/ -*.csproj -*.unityproj -*.sln -*.suo -*.tmp -*.user -*.userprefs -*.pidb -*.booproj -*.svd +# MSVC Windows builds of rustc generate these, which store debugging information *.pdb -*.mdb -*.opendb -*.VC.db - -# Unity3D generated meta files -*.pidb.meta -*.pdb.meta -*.mdb.meta - -# Unity3D generated file on crash reports -sysinfo.txt - -# Builds -*.apk -*.unitypackage +.assets_db -# Crashlytics generated file -crashlytics-build.properties +imgui.ini +**/*.spv \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 1060b04..3da3522 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,56 +1,6 @@ -{ +{ "files.exclude": { - "**/.DS_Store":true, - "**/.git":true, - "**/.gitignore":true, "**/.gitmodules":true, - "**/*.booproj":true, - "**/*.pidb":true, - "**/*.suo":true, - "**/*.user":true, - "**/*.userprefs":true, - "**/*.unityproj":true, - "**/*.dll":true, - "**/*.exe":true, - "**/*.pdf":true, - "**/*.mid":true, - "**/*.midi":true, - "**/*.wav":true, - "**/*.gif":true, - "**/*.ico":true, - "**/*.jpg":true, - "**/*.jpeg":true, - "**/*.png":true, - "**/*.psd":true, - "**/*.tga":true, - "**/*.tif":true, - "**/*.tiff":true, - "**/*.3ds":true, - "**/*.3DS":true, - "**/*.fbx":true, - "**/*.FBX":true, - "**/*.lxo":true, - "**/*.LXO":true, - "**/*.ma":true, - "**/*.MA":true, - "**/*.obj":true, - "**/*.OBJ":true, - "**/*.asset":true, - "**/*.cubemap":true, - "**/*.flare":true, - "**/*.mat":true, - "**/*.meta":true, - "**/*.prefab":true, - "**/*.unity":true, - "build/":true, - "Build/":true, - "Library/":true, - "library/":true, - "obj/":true, - "Obj/":true, - "ProjectSettings/":true, - "temp/":true, - "Temp/":true } } \ No newline at end of file diff --git a/Assets/BigSim.preset b/Assets/BigSim.preset deleted file mode 100644 index 6e909ae..0000000 --- a/Assets/BigSim.preset +++ /dev/null @@ -1,111 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!181963792 &2655988077585873504 -Preset: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: BigSim - m_TargetType: - m_NativeTypeID: 114 - m_ManagedTypePPtr: {fileID: 11500000, guid: 368ff113d9b8b924eaf0b36b3b6016a0, type: 3} - m_ManagedTypeFallback: - m_Properties: - - target: {fileID: 0} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: m_EditorHideFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: m_EditorClassIdentifier - value: - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnNum.min - value: 30 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnNum.max - value: 80 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.value.min - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.value.max - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnInterval - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.scale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.scale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.velocity.min - value: -0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.velocity.max - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.spawnNum - value: 2500 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.scale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.scale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.shareRate - value: 0.75 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.bondForce - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.maxBonds - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.force - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.torque.min - value: -20 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.torque.max - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.cost - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.speedLimit - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: boundsParams.size - value: 250 - objectReference: {fileID: 0} - m_ExcludedProperties: [] diff --git a/Assets/BigSim.preset.meta b/Assets/BigSim.preset.meta deleted file mode 100644 index f59746a..0000000 --- a/Assets/BigSim.preset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 36c137f8dbef9ac42a698a8318365c7c -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2655988077585873504 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/DefaultSim.preset b/Assets/DefaultSim.preset deleted file mode 100644 index 73c8a38..0000000 --- a/Assets/DefaultSim.preset +++ /dev/null @@ -1,111 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!181963792 &2655988077585873504 -Preset: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: DefaultSim - m_TargetType: - m_NativeTypeID: 114 - m_ManagedTypePPtr: {fileID: 11500000, guid: 368ff113d9b8b924eaf0b36b3b6016a0, type: 3} - m_ManagedTypeFallback: - m_Properties: - - target: {fileID: 0} - propertyPath: m_Enabled - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: m_EditorHideFlags - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: m_EditorClassIdentifier - value: - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnNum.min - value: 100 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnNum.max - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.value.min - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.value.max - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.spawnInterval - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.scale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.scale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.velocity.min - value: -0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: energyParams.velocity.max - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.spawnNum - value: 500 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.scale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.scale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.shareRate - value: 0.75 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.bondForce - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: cellParams.maxBonds - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.force - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.torque.min - value: -20 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.torque.max - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.cost - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: propulsionParams.speedLimit - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 0} - propertyPath: boundsParams.size - value: 100 - objectReference: {fileID: 0} - m_ExcludedProperties: [] diff --git a/Assets/DefaultSim.preset.meta b/Assets/DefaultSim.preset.meta deleted file mode 100644 index 395b4b6..0000000 --- a/Assets/DefaultSim.preset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e14959d2da9e6a840b3f5e546c4b2120 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2655988077585873504 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/Resources.meta deleted file mode 100644 index 2ec342b..0000000 --- a/Assets/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7e6fcf90741bf3947833e0bbd60c84b7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Bond.prefab b/Assets/Resources/Bond.prefab deleted file mode 100644 index 2f8c444..0000000 --- a/Assets/Resources/Bond.prefab +++ /dev/null @@ -1,206 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &6822478898225816457 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6822478898225816565} - - component: {fileID: 6822478898225816564} - - component: {fileID: 6822478898225816459} - - component: {fileID: 6822478898225816566} - - component: {fileID: -7553928659446760225} - - component: {fileID: -2638912831966323151} - m_Layer: 0 - m_Name: Bond - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &6822478898225816565 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!50 &6822478898225816564 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!255 &6822478898225816459 -FixedJoint2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_Enabled: 1 - serializedVersion: 4 - m_EnableCollision: 0 - m_ConnectedRigidBody: {fileID: 0} - m_BreakForce: Infinity - m_BreakTorque: Infinity - m_AutoConfigureConnectedAnchor: 1 - m_Anchor: {x: 0, y: 0} - m_ConnectedAnchor: {x: 0, y: 0} - m_DampingRatio: 0 - m_Frequency: 0 ---- !u!120 &6822478898225816566 -LineRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 0 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 1040396627 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_Positions: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 1} - m_Parameters: - serializedVersion: 3 - widthMultiplier: 1 - widthCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.1162796 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - colorGradient: - serializedVersion: 2 - key0: {r: 1, g: 1, b: 1, a: 1} - key1: {r: 0.4811321, g: 0.4811321, b: 0.4811321, a: 1} - key2: {r: 0, g: 0, b: 0, a: 0} - key3: {r: 0, g: 0, b: 0, a: 0} - key4: {r: 0, g: 0, b: 0, a: 0} - key5: {r: 0, g: 0, b: 0, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 15035 - ctime1: 52235 - ctime2: 0 - ctime3: 0 - ctime4: 0 - ctime5: 0 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 0 - m_NumColorKeys: 2 - m_NumAlphaKeys: 2 - numCornerVertices: 0 - numCapVertices: 0 - alignment: 0 - textureMode: 0 - shadowBias: 0.5 - generateLightingData: 0 - m_UseWorldSpace: 1 - m_Loop: 0 ---- !u!114 &-7553928659446760225 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 059de924ac9794f4888f0dabfd6d3fb8, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!232 &-2638912831966323151 -DistanceJoint2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6822478898225816457} - m_Enabled: 1 - serializedVersion: 4 - m_EnableCollision: 0 - m_ConnectedRigidBody: {fileID: 0} - m_BreakForce: Infinity - m_BreakTorque: Infinity - m_AutoConfigureConnectedAnchor: 0 - m_Anchor: {x: 0, y: 0} - m_ConnectedAnchor: {x: 0, y: 0} - m_AutoConfigureDistance: 1 - m_Distance: 1 - m_MaxDistanceOnly: 0 diff --git a/Assets/Resources/Bond.prefab.meta b/Assets/Resources/Bond.prefab.meta deleted file mode 100644 index cb6c591..0000000 --- a/Assets/Resources/Bond.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e750df93239ae6f4d8cd16f851f003b4 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Cell.prefab b/Assets/Resources/Cell.prefab deleted file mode 100644 index 7c06878..0000000 --- a/Assets/Resources/Cell.prefab +++ /dev/null @@ -1,157 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &5191007394767565875 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5191007394767565878} - - component: {fileID: 5191007394767565876} - - component: {fileID: 5191007394767565877} - - component: {fileID: 5191007394767565874} - - component: {fileID: 188598267694826087} - - component: {fileID: 6405817605003273857} - m_Layer: 0 - m_Name: Cell - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5191007394767565878 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!50 &5191007394767565876 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0 - m_GravityScale: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!58 &5191007394767565877 -CircleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - serializedVersion: 2 - m_Radius: 0.5 ---- !u!114 &5191007394767565874 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d2d3ffa8f747834e90f6c8fa49fc7b8, type: 3} - m_Name: - m_EditorClassIdentifier: - food: 0 ---- !u!114 &188598267694826087 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa06092e0908a84585e814e7c214a51, type: 3} - m_Name: - m_EditorClassIdentifier: - m_MaxArrayCount: 80 - m_PosArray: [] - m_Uv0Array: [] - m_TanArray: [] - m_IndexArray: - m_GeomArray: [] ---- !u!212 &6405817605003273857 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 51f9a03742033d74abeb6a022b55c5ab, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: -2413806693520163455, guid: 4adeaf2d2b1c7417e89f026626d8264f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.2, y: 0.2} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 diff --git a/Assets/Resources/Cell.prefab.meta b/Assets/Resources/Cell.prefab.meta deleted file mode 100644 index 7ffe45c..0000000 --- a/Assets/Resources/Cell.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a4506f2a23f646946bfdc3b6ccb058ee -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/CellMaterial.mat b/Assets/Resources/CellMaterial.mat deleted file mode 100644 index 237bef9..0000000 --- a/Assets/Resources/CellMaterial.mat +++ /dev/null @@ -1,87 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: CellMaterial - m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _AlphaTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - PixelSnap: 0 - - _BumpScale: 1 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _EnableExternalAlpha: 0 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 1 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _Flip: {r: 1, g: 1, b: 1, a: 1} - - _RendererColor: {r: 1, g: 1, b: 1, a: 1} - m_BuildTextureStacks: [] diff --git a/Assets/Resources/CellMaterial.mat.meta b/Assets/Resources/CellMaterial.mat.meta deleted file mode 100644 index 74cbd03..0000000 --- a/Assets/Resources/CellMaterial.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 51f9a03742033d74abeb6a022b55c5ab -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Energy.prefab b/Assets/Resources/Energy.prefab deleted file mode 100644 index 8babed2..0000000 --- a/Assets/Resources/Energy.prefab +++ /dev/null @@ -1,222 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &5191007394767565875 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5191007394767565878} - - component: {fileID: 5191007394767565877} - - component: {fileID: 6405817605003273857} - - component: {fileID: 2916823960581133201} - - component: {fileID: 999171348207563144} - m_Layer: 0 - m_Name: Energy - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5191007394767565878 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7354474238210472428} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!58 &5191007394767565877 -CircleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - serializedVersion: 2 - m_Radius: 0.5 ---- !u!212 &6405817605003273857 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 51f9a03742033d74abeb6a022b55c5ab, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: -2413806693520163455, guid: 4adeaf2d2b1c7417e89f026626d8264f, type: 3} - m_Color: {r: 0.34100214, g: 0.9150943, b: 0.38745055, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.2, y: 0.2} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!114 &2916823960581133201 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2504d360d5870d04790a0aa0b57e529e, type: 3} - m_Name: - m_EditorClassIdentifier: - _energy: 0 ---- !u!50 &999171348207563144 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 0.0001 - m_LinearDrag: 0 - m_AngularDrag: 0 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!1 &9083704860037641897 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7354474238210472428} - - component: {fileID: 2211209216172116819} - m_Layer: 0 - m_Name: Square - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7354474238210472428 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9083704860037641897} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.016, y: -0.016, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 5191007394767565878} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &2211209216172116819 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9083704860037641897} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 1 - m_Sprite: {fileID: 21300000, guid: ac47ed8ccc79cf04dae198b9cc5b3a6f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 diff --git a/Assets/Resources/Energy.prefab.meta b/Assets/Resources/Energy.prefab.meta deleted file mode 100644 index b53aac4..0000000 --- a/Assets/Resources/Energy.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0270a18e3221d854293fec38eb43700c -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/EnergySpawner.prefab b/Assets/Resources/EnergySpawner.prefab deleted file mode 100644 index 38c5ad6..0000000 --- a/Assets/Resources/EnergySpawner.prefab +++ /dev/null @@ -1,45 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &6340336763261038578 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4955807590189563470} - - component: {fileID: 3466322127576140242} - m_Layer: 0 - m_Name: EnergySpawner - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4955807590189563470 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6340336763261038578} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.1731513, y: -3.6977034, z: -8.609141} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &3466322127576140242 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6340336763261038578} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 890544c2c66c9b64aab1479eef606733, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Resources/EnergySpawner.prefab.meta b/Assets/Resources/EnergySpawner.prefab.meta deleted file mode 100644 index 589b05e..0000000 --- a/Assets/Resources/EnergySpawner.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c7ee05a19a0f3864096663e8a487eba5 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Propulsion.prefab b/Assets/Resources/Propulsion.prefab deleted file mode 100644 index 7bda660..0000000 --- a/Assets/Resources/Propulsion.prefab +++ /dev/null @@ -1,253 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &5191007394767565875 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5191007394767565878} - - component: {fileID: 5191007394767565876} - - component: {fileID: 5191007394767565877} - - component: {fileID: 188598267694826087} - - component: {fileID: 6405817605003273857} - - component: {fileID: 7767585597347009446} - - component: {fileID: 7775209578536793626} - m_Layer: 0 - m_Name: Propulsion - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5191007394767565878 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7354474238210472428} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!50 &5191007394767565876 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0 - m_GravityScale: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!58 &5191007394767565877 -CircleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - serializedVersion: 2 - m_Radius: 0.5 ---- !u!114 &188598267694826087 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa06092e0908a84585e814e7c214a51, type: 3} - m_Name: - m_EditorClassIdentifier: - m_MaxArrayCount: 80 - m_PosArray: [] - m_Uv0Array: [] - m_TanArray: [] - m_IndexArray: - m_GeomArray: [] ---- !u!212 &6405817605003273857 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 51f9a03742033d74abeb6a022b55c5ab, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: -2413806693520163455, guid: 4adeaf2d2b1c7417e89f026626d8264f, type: 3} - m_Color: {r: 0.7830189, g: 0.30836982, b: 0.2474635, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.2, y: 0.2} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!114 &7767585597347009446 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6d702e2cac81f9743a8591571191b063, type: 3} - m_Name: - m_EditorClassIdentifier: - food: 0 ---- !u!247 &7775209578536793626 -ConstantForce2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_Force: {x: 0, y: 0} - m_RelativeForce: {x: 0, y: 0} - m_Torque: 0 ---- !u!1 &9083704860037641897 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7354474238210472428} - - component: {fileID: 2211209216172116819} - m_Layer: 0 - m_Name: Icon - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7354474238210472428 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9083704860037641897} - m_LocalRotation: {x: 0, y: 0, z: -0.38268343, w: 0.92387956} - m_LocalPosition: {x: -0.0475, y: 0.002, z: 0} - m_LocalScale: {x: 1.5634384, y: 1.5616572, z: 1.7266} - m_Children: [] - m_Father: {fileID: 5191007394767565878} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -45} ---- !u!212 &2211209216172116819 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9083704860037641897} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 1 - m_Sprite: {fileID: 21300000, guid: 1bb69cd91685d9248a58b144052746f3, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 diff --git a/Assets/Resources/Propulsion.prefab.meta b/Assets/Resources/Propulsion.prefab.meta deleted file mode 100644 index f5aa07f..0000000 --- a/Assets/Resources/Propulsion.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2cfa5604a8269b845a1346fb0184531a -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Weapon.prefab b/Assets/Resources/Weapon.prefab deleted file mode 100644 index e18b156..0000000 --- a/Assets/Resources/Weapon.prefab +++ /dev/null @@ -1,241 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3752055919480260941 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2499941653523545479} - - component: {fileID: 5329733401925229309} - m_Layer: 0 - m_Name: Circle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2499941653523545479 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3752055919480260941} - m_LocalRotation: {x: 0, y: 0, z: -0.38268343, w: 0.92387956} - m_LocalPosition: {x: 0.001, y: -0.001, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 5191007394767565878} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -45} ---- !u!212 &5329733401925229309 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3752055919480260941} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 1 - m_Sprite: {fileID: 21300000, guid: 2b4752bce841cc74bb73820ce5212d34, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.16, y: 0.16} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!1 &5191007394767565875 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5191007394767565878} - - component: {fileID: 5191007394767565876} - - component: {fileID: 5191007394767565877} - - component: {fileID: 188598267694826087} - - component: {fileID: 6405817605003273857} - - component: {fileID: 6942240562595880525} - m_Layer: 0 - m_Name: Weapon - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5191007394767565878 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 2499941653523545479} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!50 &5191007394767565876 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0 - m_GravityScale: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!58 &5191007394767565877 -CircleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - serializedVersion: 2 - m_Radius: 0.5 ---- !u!114 &188598267694826087 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9aa06092e0908a84585e814e7c214a51, type: 3} - m_Name: - m_EditorClassIdentifier: - m_MaxArrayCount: 80 - m_PosArray: [] - m_Uv0Array: [] - m_TanArray: [] - m_IndexArray: - m_GeomArray: [] ---- !u!212 &6405817605003273857 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 51f9a03742033d74abeb6a022b55c5ab, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: -2413806693520163455, guid: 4adeaf2d2b1c7417e89f026626d8264f, type: 3} - m_Color: {r: 0.24705882, g: 0.78431374, b: 0.7602444, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 0.2, y: 0.2} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!114 &6942240562595880525 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5191007394767565875} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8c70ce70138186d4da0c9432338b2049, type: 3} - m_Name: - m_EditorClassIdentifier: - food: 0 diff --git a/Assets/Resources/Weapon.prefab.meta b/Assets/Resources/Weapon.prefab.meta deleted file mode 100644 index 54af89e..0000000 --- a/Assets/Resources/Weapon.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ee639a7329e56a5458a82b48862dd453 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Restitution.physicsMaterial2D b/Assets/Restitution.physicsMaterial2D deleted file mode 100644 index 2924d4f..0000000 --- a/Assets/Restitution.physicsMaterial2D +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!62 &6200000 -PhysicsMaterial2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Restitution - friction: 0 - bounciness: 1 diff --git a/Assets/Restitution.physicsMaterial2D.meta b/Assets/Restitution.physicsMaterial2D.meta deleted file mode 100644 index b88ae77..0000000 --- a/Assets/Restitution.physicsMaterial2D.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6c8f131a264623845a551cb6834538bc -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 6200000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta deleted file mode 100644 index 7fe8e10..0000000 --- a/Assets/Scenes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 131a6b21c8605f84396be9f6751fb6e3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity deleted file mode 100644 index 61dd6b5..0000000 --- a/Assets/Scenes/Main.unity +++ /dev/null @@ -1,933 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &595839523 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 595839527} - - component: {fileID: 595839526} - - component: {fileID: 595839525} - - component: {fileID: 595839524} - m_Layer: 0 - m_Name: top - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!50 &595839524 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595839523} - m_BodyType: 2 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!61 &595839525 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595839523} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 1, y: 1} - newSize: {x: 1, y: 1} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1} - m_EdgeRadius: 0 ---- !u!212 &595839526 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595839523} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} - m_Color: {r: 0.38679248, g: 0.38679248, b: 0.38679248, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &595839527 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595839523} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2128682226} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &626172077 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 626172081} - - component: {fileID: 626172080} - - component: {fileID: 626172079} - - component: {fileID: 626172078} - m_Layer: 0 - m_Name: bottom - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!50 &626172078 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 626172077} - m_BodyType: 2 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!61 &626172079 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 626172077} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 1, y: 1} - newSize: {x: 1, y: 1} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1} - m_EdgeRadius: 0 ---- !u!212 &626172080 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 626172077} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} - m_Color: {r: 0.38679248, g: 0.38679248, b: 0.38679248, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &626172081 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 626172077} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2.1, y: 0.1, z: 1} - m_Children: [] - m_Father: {fileID: 2128682226} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1137649122 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalPosition.x - value: 3.1731513 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalPosition.y - value: -3.6977034 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalPosition.z - value: -8.609141 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4955807590189563470, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6340336763261038578, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} - propertyPath: m_Name - value: EnergySpawner - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: c7ee05a19a0f3864096663e8a487eba5, type: 3} ---- !u!1 &1164658091 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1164658094} - - component: {fileID: 1164658093} - - component: {fileID: 1164658092} - - component: {fileID: 1164658095} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1164658092 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1164658091} - m_Enabled: 1 ---- !u!20 &1164658093 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1164658091} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.090512626, g: 0.11011394, b: 0.16981131, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 1 - orthographic size: 77.17914 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1164658094 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1164658091} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1164658095 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1164658091} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 11066393ed70567408d629e3ec2f9fab, type: 3} - m_Name: - m_EditorClassIdentifier: - targetOrtho: 0 - minOrtho: 1 - zoomSpeed: 200 ---- !u!1 &1277020874 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1277020876} - - component: {fileID: 1277020875} - m_Layer: 0 - m_Name: Settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 2147483647 - m_IsActive: 1 ---- !u!114 &1277020875 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1277020874} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 368ff113d9b8b924eaf0b36b3b6016a0, type: 3} - m_Name: - m_EditorClassIdentifier: - energyParams: - spawnNum: - min: 1 - max: 20 - value: - min: 5 - max: 20 - spawnInterval: 1 - scale: {x: 1, y: 1} - velocity: - min: -0.2 - max: 0.2 - toCellThresh: 50 - cellParams: - scale: {x: 1, y: 1} - shareRate: 0.75 - bondForce: 5 - maxBonds: 6 - minEnergy: 15 - propulsionParams: - force: 6 - torque: - min: -20 - max: 20 - cost: 0.5 - speedLimit: 8 - boundaryParams: - width: 200 - height: 200 - thickness: 4 - weaponParams: - attackCost: 10 - attackRadius: 10 - drainRate: 0.5 ---- !u!4 &1277020876 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1277020874} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1474378132 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1474378136} - - component: {fileID: 1474378135} - - component: {fileID: 1474378134} - - component: {fileID: 1474378133} - m_Layer: 0 - m_Name: right - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!50 &1474378133 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1474378132} - m_BodyType: 2 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!61 &1474378134 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1474378132} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 1, y: 1} - newSize: {x: 1, y: 1} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1} - m_EdgeRadius: 0 ---- !u!212 &1474378135 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1474378132} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} - m_Color: {r: 0.38679248, g: 0.38679248, b: 0.38679248, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &1474378136 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1474378132} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.1, y: 2.1, z: 1} - m_Children: [] - m_Father: {fileID: 2128682226} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1482395330 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1482395334} - - component: {fileID: 1482395333} - - component: {fileID: 1482395332} - - component: {fileID: 1482395331} - m_Layer: 0 - m_Name: left - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!50 &1482395331 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1482395330} - m_BodyType: 2 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!61 &1482395332 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1482395330} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 6200000, guid: 6c8f131a264623845a551cb6834538bc, type: 2} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 1, y: 1} - newSize: {x: 1, y: 1} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - serializedVersion: 2 - m_Size: {x: 1, y: 1} - m_EdgeRadius: 0 ---- !u!212 &1482395333 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1482395330} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} - m_Color: {r: 0.38679248, g: 0.38679248, b: 0.38679248, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &1482395334 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1482395330} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.1, y: 2.1, z: 1.55792} - m_Children: [] - m_Father: {fileID: 2128682226} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2128682225 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2128682226} - - component: {fileID: 2128682227} - m_Layer: 0 - m_Name: Bounds - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2128682226 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2128682225} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 595839527} - - {fileID: 626172081} - - {fileID: 1482395334} - - {fileID: 1474378136} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2128682227 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2128682225} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0425ab7c0f98cb8418aac54a9ab46ca4, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Scenes/Main.unity.meta b/Assets/Scenes/Main.unity.meta deleted file mode 100644 index 0308458..0000000 --- a/Assets/Scenes/Main.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d16f19dfbe731c74fab878dcb2a83dc3 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts.meta b/Assets/Scripts.meta deleted file mode 100644 index 9c40719..0000000 --- a/Assets/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 30eb81540aeee5247b2e9d856528769d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Bond.cs b/Assets/Scripts/Bond.cs deleted file mode 100644 index 4c08a21..0000000 --- a/Assets/Scripts/Bond.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Bond : MonoBehaviour -{ - DistanceJoint2D spring; - FixedJoint2D joint; - LineRenderer line; - new Rigidbody2D rigidbody; - - // Start is called before the first frame update - void OnEnable() - { - spring = GetComponent(); - joint = GetComponent(); - line = GetComponent(); - rigidbody = GetComponent(); - } - - private void Start() { - joint.connectedBody = transform.parent.GetComponent(); - } - - void FixedUpdate() - { - if (spring.connectedBody) { - line.SetPosition(0, spring.connectedBody.position); - line.SetPosition(1, transform.position); - } - } - - // Connect to another given jeff - public void ConnectTo(Cell otherJeff) { - spring.connectedBody = otherJeff.GetComponent(); - spring.distance = 0.2f; - } -} diff --git a/Assets/Scripts/Bond.cs.meta b/Assets/Scripts/Bond.cs.meta deleted file mode 100644 index 14fec13..0000000 --- a/Assets/Scripts/Bond.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 059de924ac9794f4888f0dabfd6d3fb8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Bounds.cs b/Assets/Scripts/Bounds.cs deleted file mode 100644 index 6c2ef0c..0000000 --- a/Assets/Scripts/Bounds.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Bounds : MonoBehaviour -{ - MinMaxF boundsX; - MinMaxF boundsY; - - BoundaryParams boundaryConfig; - - void Awake() - { - boundaryConfig = GameObject.Find("Settings").GetComponent().boundaryParams; - - var left = transform.Find("left"); - var right = transform.Find("right"); - var bottom = transform.Find("bottom"); - var top = transform.Find("top"); - - left.transform.Translate(-boundaryConfig.width/2, 0, 0); - right.transform.Translate(boundaryConfig.width/2, 0, 0); - bottom.transform.Translate(0, -boundaryConfig.height/2, 0); - top.transform.Translate(0, boundaryConfig.height/2, 0); - - left.transform.localScale = new Vector3(boundaryConfig.thickness, boundaryConfig.height, 0); - right.transform.localScale = new Vector3(boundaryConfig.thickness, boundaryConfig.height, 0); - bottom.transform.localScale = new Vector3(boundaryConfig.width, boundaryConfig.thickness, 0); - top.transform.localScale = new Vector3(boundaryConfig.width, boundaryConfig.thickness, 0); - - boundsX.min = -boundaryConfig.width/2 + boundaryConfig.thickness/2; - boundsX.max = boundaryConfig.width/2 - boundaryConfig.thickness/2; - boundsY.min = -boundaryConfig.height/2 + boundaryConfig.thickness/2; - boundsY.max = boundaryConfig.height/2 - boundaryConfig.thickness/2; - } - - public Vector3 GetRandomPos() - { - return new Vector3(boundsX.sample(), boundsY.sample(), 0.0f); - } -} diff --git a/Assets/Scripts/Bounds.cs.meta b/Assets/Scripts/Bounds.cs.meta deleted file mode 100644 index 0bf1970..0000000 --- a/Assets/Scripts/Bounds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0425ab7c0f98cb8418aac54a9ab46ca4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/CameraControl.cs b/Assets/Scripts/CameraControl.cs deleted file mode 100644 index 0185bcb..0000000 --- a/Assets/Scripts/CameraControl.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class CameraControl : MonoBehaviour -{ - Camera cam; - Vector3 clickPos; - Vector3 initCamPos; - private Vector3 lastPosition; - public float targetOrtho; - public float minOrtho = 1.0f; - float maxOrtho = 20.0f; - public float zoomSpeed = 1; - - // Start is called before the first frame update - void Start() - { - cam = GetComponent(); - targetOrtho = Camera.main.orthographicSize; - maxOrtho = 1000; - } - - - void Update() - { - if (Input.GetMouseButtonDown(2)) - { - lastPosition = cam.ScreenToWorldPoint(Input.mousePosition); - } - - if (Input.GetMouseButton(2)) - { - var delta = cam.ScreenToWorldPoint(Input.mousePosition) - lastPosition; - transform.Translate(-delta.x, -delta.y, 0); - lastPosition = cam.ScreenToWorldPoint(Input.mousePosition); - } - - float scroll = Input.GetAxis("Mouse ScrollWheel"); - if (scroll != 0.0f) { - targetOrtho -= (scroll * zoomSpeed) * (targetOrtho / maxOrtho); - targetOrtho = Mathf.Clamp(targetOrtho, minOrtho, maxOrtho); - } - Camera.main.orthographicSize = targetOrtho; - } -} diff --git a/Assets/Scripts/CameraControl.cs.meta b/Assets/Scripts/CameraControl.cs.meta deleted file mode 100644 index 14c1576..0000000 --- a/Assets/Scripts/CameraControl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 11066393ed70567408d629e3ec2f9fab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Cell.cs b/Assets/Scripts/Cell.cs deleted file mode 100644 index ef01a5e..0000000 --- a/Assets/Scripts/Cell.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Cell : MonoBehaviour -{ - public Dictionary joints = new Dictionary(); - protected new Rigidbody2D rigidbody; - protected GameObject bondPrefab; - - public float energy = 0.0f; - - private CellParams cellConfig; - private GameObject EnergyPrefab; - - protected void Awake() { - cellConfig = GameObject.Find("Settings").GetComponent().cellParams; - rigidbody = GetComponent(); - bondPrefab = Resources.Load("Bond"); - EnergyPrefab = Resources.Load("Energy"); - } - - protected void FixedUpdate() - { - foreach (var joint in joints) { - Cell neighbor = null; - - if (joint.Key.GetComponent()) - neighbor = joint.Key.GetComponent(); - - if (energy >= cellConfig.shareRate) { - neighbor.energy += cellConfig.shareRate; - energy -= cellConfig.shareRate; - } - } - - if (energy < cellConfig.minEnergy) { - destabilize(); - } - } - - void destabilize() - { - Debug.Log("Destroying!"); - foreach (var joint in joints) { - var cell = joint.Key.GetComponent(); - GameObject.Destroy(joint.Value); - cell.joints.Remove(gameObject); - } - var newEnergy = GameObject.Instantiate( - EnergyPrefab, - transform.position, - Quaternion.identity - ); - newEnergy.GetComponent().energy = energy; - - joints.Clear(); - GameObject.Destroy(gameObject); - } - - // Called when colliding with another rigidbody - void OnCollisionEnter2D(Collision2D col) - { - handleCollision(col); - handleEnergy(col); - } - - void handleCollision(Collision2D col) - { - var otherCell = col.gameObject.GetComponent(); - if (otherCell == null) { - return; - } - - if (joints.Count < cellConfig.maxBonds - && col.relativeVelocity.magnitude > cellConfig.bondForce - && !joints.ContainsKey(col.gameObject) - && !otherCell.joints.ContainsKey(gameObject)) - { - var obj = GameObject.Instantiate(bondPrefab, Vector3.zero, Quaternion.identity); - obj.transform.parent = transform; - var cellJoint = obj.GetComponent(); - cellJoint.transform.localPosition = Vector3.zero; - cellJoint.ConnectTo(otherCell); - joints.Add(col.gameObject, cellJoint); - otherCell.joints.Add(gameObject, cellJoint); - } - } - - void handleEnergy(Collision2D col) - { - var energyObj = col.gameObject.GetComponent(); - if (energyObj == null) { - return; - } - - energy += energyObj.energy; - - GameObject.Destroy(col.gameObject); - } -} diff --git a/Assets/Scripts/Cell.cs.meta b/Assets/Scripts/Cell.cs.meta deleted file mode 100644 index afe315c..0000000 --- a/Assets/Scripts/Cell.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d2d3ffa8f747834e90f6c8fa49fc7b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Energy.cs b/Assets/Scripts/Energy.cs deleted file mode 100644 index f644c9e..0000000 --- a/Assets/Scripts/Energy.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Energy : MonoBehaviour -{ - public float _energy; - public static List instances = new List(); - - public float energy { - get => _energy; - set - { - _energy = value; - var color = sprite.color; - color.a = (-1f / (_energy / 20f + 1f)) + 1f; - sprite.color = color; - } - } - - List CellPrefabs; - - EnergyParams energyConfig; - SpriteRenderer sprite; - - void Awake() - { - CellPrefabs = new List(){ - Resources.Load("Cell"), - Resources.Load("Propulsion"), - Resources.Load("Weapon"), - }; - - sprite = GetComponent(); - energyConfig = GameObject.Find("Settings").GetComponent().energyParams; - energy = energyConfig.value.sample(); - } - - private void Start() { - var body = GetComponent(); - body.AddForce(new Vector2(energyConfig.velocity.sample(), energyConfig.velocity.sample())); - } - - private void FixedUpdate() { - if (energy >= energyConfig.toCellThresh) { - var newCell = GameObject.Instantiate( - CellPrefabs[(int)Random.Range(0, CellPrefabs.Count)], - transform.position, - Quaternion.identity - ); - newCell.transform.localScale = energyConfig.scale; - newCell.GetComponent().energy = energy; - - GameObject.Destroy(gameObject); - } - } - - void OnCollisionEnter2D(Collision2D col) - { - if (gameObject.activeSelf == false) { - return; - } - - var energyObj = col.gameObject.GetComponent(); - if (energyObj == null) { - return; - } - - col.gameObject.SetActive(false); - energy += energyObj.energy; - GameObject.Destroy(col.gameObject); - } - - // Add to static list of instances on enable - private void OnEnable() { - instances.Add(transform.gameObject); - } - - // Remove from static list of instances on disable - private void OnDisable() { - instances.Remove(transform.gameObject); - } -} diff --git a/Assets/Scripts/Energy.cs.meta b/Assets/Scripts/Energy.cs.meta deleted file mode 100644 index 7d67878..0000000 --- a/Assets/Scripts/Energy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2504d360d5870d04790a0aa0b57e529e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/EnergySpawner.cs b/Assets/Scripts/EnergySpawner.cs deleted file mode 100644 index a1f786c..0000000 --- a/Assets/Scripts/EnergySpawner.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class EnergySpawner : MonoBehaviour -{ - GameObject EnergyPrefab; - - List CellPrefabs; - - EnergyParams energyConfig; - Bounds bounds; - - private float curTime; - - void Start() - { - EnergyPrefab = Resources.Load("Energy"); - - energyConfig = GameObject.Find("Settings").GetComponent().energyParams; - bounds = GameObject.Find("Bounds").GetComponent(); - - curTime = energyConfig.spawnInterval; - } - - // Update is called once per frame - void FixedUpdate() - { - spawnEnergy(); - } - - void spawnEnergy() - { - curTime -= Time.fixedDeltaTime; - if (curTime >= 0) { - return; - } - curTime = energyConfig.spawnInterval; - - var nEnergy = (int)Random.Range(energyConfig.spawnNum.min, energyConfig.spawnNum.max); - for (int i = 0; i < nEnergy; i++) - { - var energy = GameObject.Instantiate( - EnergyPrefab, - bounds.GetRandomPos(), - Quaternion.identity - ); - energy.transform.localScale = energyConfig.scale; - } - - } -} diff --git a/Assets/Scripts/EnergySpawner.cs.meta b/Assets/Scripts/EnergySpawner.cs.meta deleted file mode 100644 index b543b9b..0000000 --- a/Assets/Scripts/EnergySpawner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 890544c2c66c9b64aab1479eef606733 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Propulsion.cs b/Assets/Scripts/Propulsion.cs deleted file mode 100644 index 3332926..0000000 --- a/Assets/Scripts/Propulsion.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Propulsion : Cell -{ - PropulsionParams propulsionConfig; - - ConstantForce2D prop; - SpriteRenderer icon; - Vector2 force; - float torque; - - new private void Awake() { - base.Awake(); - icon = transform.Find("Icon").GetComponent(); - propulsionConfig = GameObject.Find("Settings").GetComponent().propulsionParams; - } - - protected void Start() { - - prop = GetComponent(); - force = Vector2.right * propulsionConfig.force; - torque = propulsionConfig.torque.sample(); - transform.Rotate(Vector3.forward * 360f * Random.Range(0.0f, 1.0f)); - } - - new private void FixedUpdate() { - if (energy > propulsionConfig.cost) { - if (rigidbody.velocity.magnitude < propulsionConfig.speedLimit) { - energy -= propulsionConfig.cost; - prop.relativeForce = force; - prop.torque = torque; - icon.color = Color.white; - } else { - prop.relativeForce = Vector2.zero; - prop.torque = 0.0f; - icon.color = Color.grey; - // We have more energy than we need, let's share it - base.FixedUpdate(); - } - } else { - prop.relativeForce = Vector2.zero; - prop.torque = 0.0f; - icon.color = Color.black; - } - if (Mathf.Abs(rigidbody.angularVelocity) > Mathf.Abs(torque)) { - prop.torque = 0.0f; - } - } -} - diff --git a/Assets/Scripts/Propulsion.cs.meta b/Assets/Scripts/Propulsion.cs.meta deleted file mode 100644 index d4cd31c..0000000 --- a/Assets/Scripts/Propulsion.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d702e2cac81f9743a8591571191b063 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Settings.cs b/Assets/Scripts/Settings.cs deleted file mode 100644 index 704b44b..0000000 --- a/Assets/Scripts/Settings.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System; - -[Serializable] -public class Settings : MonoBehaviour -{ - public EnergyParams energyParams; - public CellParams cellParams; - public PropulsionParams propulsionParams; - public BoundaryParams boundaryParams; - public WeaponParams weaponParams; -} - -[Serializable] -public struct BoundaryParams -{ - public float width; - public float height; - public float thickness; -} - -[Serializable] -public struct WeaponParams -{ - public float attackCost; - public float attackRadius; - public float drainRate; -} - -[Serializable] -public struct PropulsionParams -{ - public float force; - public MinMaxF torque; - public float cost; - public float speedLimit; -} - - -[Serializable] -public struct EnergyParams -{ - public MinMaxI spawnNum; - public MinMaxF value; - public float spawnInterval; // Spawn interval in seconds - public Vector2 scale; - public MinMaxF velocity; - public float toCellThresh; -} - -[Serializable] -public struct CellParams -{ - public Vector2 scale; - public float shareRate; - public float bondForce; - public int maxBonds; - public float minEnergy; -} - -[Serializable] -public struct MinMaxI -{ - public int min; - public int max; - - public int sample() - { - return UnityEngine.Random.Range(min, max); - } -} - - -[Serializable] -public struct MinMaxF -{ - public float min; - public float max; - - public float sample() - { - return UnityEngine.Random.Range(min, max); - } -} diff --git a/Assets/Scripts/Settings.cs.meta b/Assets/Scripts/Settings.cs.meta deleted file mode 100644 index 5570bb7..0000000 --- a/Assets/Scripts/Settings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 368ff113d9b8b924eaf0b36b3b6016a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Weapon.cs b/Assets/Scripts/Weapon.cs deleted file mode 100644 index 9063969..0000000 --- a/Assets/Scripts/Weapon.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; - -public class Weapon : Cell -{ - WeaponParams weaponConfig; - - new private void Awake() { - base.Awake(); - weaponConfig = GameObject.Find("Settings").GetComponent().weaponParams; - } - - new private void FixedUpdate() - { - base.FixedUpdate(); - attack(); - } - - void attack() - { - if (energy < weaponConfig.attackCost) { - return; - } - - Collider2D[] near = Physics2D.OverlapCircleAll(transform.position, weaponConfig.attackRadius); - foreach (var collider in near) { - if (energy < weaponConfig.attackCost) { - return; - } - - Cell obj = collider.GetComponentInParent(); - if (obj == null || obj == this) { - continue; - } - - var stolen = obj.energy * weaponConfig.drainRate; - energy += stolen; - obj.energy -= stolen; - - energy -= weaponConfig.attackCost; - } - } -} - diff --git a/Assets/Scripts/Weapon.cs.meta b/Assets/Scripts/Weapon.cs.meta deleted file mode 100644 index ec6e925..0000000 --- a/Assets/Scripts/Weapon.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8c70ce70138186d4da0c9432338b2049 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..f91aa9a --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "petri" +version = "0.1.0" +edition = "2021" + +[dependencies] +#################### +# GUI +#################### +winit = "0.28" +wgpu = { version = "0.17", features = ["glsl"] } +naga = "0.13" +egui = "0.23" +egui_plot = "0.23" +egui-wgpu = "0.23" +egui-winit = "0.23" +num-format = "0.4" +bytemuck = { version = "1.14", features = [ "derive" ] } + +#################### +# Simulation +#################### +fps_counter = "2.0.0" +rayon = "1.8" +rand = "0.8.5" +bevy_ecs = { version = "0.12", features = ["multi-threaded"] } +bevy_tasks = "0.12" +futures = "0.3" +hdrhistogram = "7.5" +lazy_static = "1.4" +quanta = "0.12" +ron = { version = "0.8", features = ["integer128"] } +serde = { version = "1.0", features = ["derive"] } +glam = { version = "0.24", default-features = false, features = ["libm", "serde"] } + +[profile.dev.package."*"] +opt-level = 3 + +# Maximum optimization for release builds +[profile.release] +codegen-units = 1 +lto = true +panic = "abort" +incremental = false \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index bb8b638..0000000 --- a/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2021, Haydn Jones -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Packages/manifest.json b/Packages/manifest.json deleted file mode 100644 index 56fb938..0000000 --- a/Packages/manifest.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "dependencies": { - "com.unity.2d.animation": "6.0.4", - "com.unity.2d.pixel-perfect": "5.0.0", - "com.unity.2d.psdimporter": "5.0.4", - "com.unity.2d.sprite": "1.0.0", - "com.unity.2d.spriteshape": "6.0.1", - "com.unity.2d.tilemap": "1.0.0", - "com.unity.2d.tilemap.extras": "2.0.0", - "com.unity.burst": "1.5.4", - "com.unity.collab-proxy": "1.5.7", - "com.unity.ide.rider": "3.0.7", - "com.unity.ide.visualstudio": "2.0.9", - "com.unity.ide.vscode": "1.2.3", - "com.unity.test-framework": "1.1.27", - "com.unity.textmeshpro": "3.0.6", - "com.unity.timeline": "1.5.5", - "com.unity.toolchain.linux-x86_64": "0.1.18-preview", - "com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.20-preview", - "com.unity.ugui": "1.0.0", - "com.unity.visualscripting": "1.6.1", - "com.unity.modules.ai": "1.0.0", - "com.unity.modules.androidjni": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.cloth": "1.0.0", - "com.unity.modules.director": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.screencapture": "1.0.0", - "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.terrainphysics": "1.0.0", - "com.unity.modules.tilemap": "1.0.0", - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.uielements": "1.0.0", - "com.unity.modules.umbra": "1.0.0", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.unitywebrequestassetbundle": "1.0.0", - "com.unity.modules.unitywebrequestaudio": "1.0.0", - "com.unity.modules.unitywebrequesttexture": "1.0.0", - "com.unity.modules.unitywebrequestwww": "1.0.0", - "com.unity.modules.vehicles": "1.0.0", - "com.unity.modules.video": "1.0.0", - "com.unity.modules.vr": "1.0.0", - "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0" - } -} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json deleted file mode 100644 index bab27bd..0000000 --- a/Packages/packages-lock.json +++ /dev/null @@ -1,496 +0,0 @@ -{ - "dependencies": { - "com.unity.2d.animation": { - "version": "6.0.4", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.2d.common": "5.0.0", - "com.unity.mathematics": "1.1.0", - "com.unity.2d.sprite": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.uielements": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.2d.common": { - "version": "5.0.0", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.2d.sprite": "1.0.0", - "com.unity.modules.uielements": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.2d.path": { - "version": "5.0.0", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.2d.pixel-perfect": { - "version": "5.0.0", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.2d.psdimporter": { - "version": "5.0.4", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.2d.common": "5.0.0", - "com.unity.2d.animation": "6.0.4", - "com.unity.2d.sprite": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.2d.sprite": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.2d.spriteshape": { - "version": "6.0.1", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.mathematics": "1.1.0", - "com.unity.2d.common": "5.0.0", - "com.unity.2d.path": "5.0.0", - "com.unity.modules.physics2d": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.2d.tilemap": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.2d.tilemap.extras": { - "version": "2.0.0", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.tilemap": "1.0.0", - "com.unity.2d.tilemap": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.burst": { - "version": "1.5.4", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.mathematics": "1.2.1" - }, - "url": "https://packages.unity.com" - }, - "com.unity.collab-proxy": { - "version": "1.5.7", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.nuget.newtonsoft-json": "2.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ext.nunit": { - "version": "1.0.6", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.ide.rider": { - "version": "3.0.7", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ext.nunit": "1.0.6" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ide.visualstudio": { - "version": "2.0.9", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.9" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ide.vscode": { - "version": "1.2.3", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.mathematics": { - "version": "1.2.1", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.nuget.newtonsoft-json": { - "version": "2.0.0", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.sysroot": { - "version": "0.1.19-preview", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.sysroot.linux-x86_64": { - "version": "0.1.14-preview", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.sysroot": "0.1.18-preview" - }, - "url": "https://packages.unity.com" - }, - "com.unity.test-framework": { - "version": "1.1.27", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ext.nunit": "1.0.6", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.textmeshpro": { - "version": "3.0.6", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.timeline": { - "version": "1.5.5", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.director": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.toolchain.linux-x86_64": { - "version": "0.1.18-preview", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.sysroot": "0.1.19-preview", - "com.unity.sysroot.linux-x86_64": "0.1.14-preview" - }, - "url": "https://packages.unity.com" - }, - "com.unity.toolchain.win-x86_64-linux-x86_64": { - "version": "0.1.20-preview", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.sysroot": "0.1.19-preview", - "com.unity.sysroot.linux-x86_64": "0.1.14-preview" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ugui": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.imgui": "1.0.0" - } - }, - "com.unity.visualscripting": { - "version": "1.6.1", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0", - "com.unity.modules.ai": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.modules.ai": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.androidjni": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.animation": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.assetbundle": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.audio": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.cloth": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.physics": "1.0.0" - } - }, - "com.unity.modules.director": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.animation": "1.0.0" - } - }, - "com.unity.modules.imageconversion": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.imgui": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.jsonserialize": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.particlesystem": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.physics": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.physics2d": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.screencapture": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.imageconversion": "1.0.0" - } - }, - "com.unity.modules.subsystems": { - "version": "1.0.0", - "depth": 1, - "source": "builtin", - "dependencies": { - "com.unity.modules.jsonserialize": "1.0.0" - } - }, - "com.unity.modules.terrain": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.terrainphysics": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.terrain": "1.0.0" - } - }, - "com.unity.modules.tilemap": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.physics2d": "1.0.0" - } - }, - "com.unity.modules.ui": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.uielements": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.uielementsnative": "1.0.0" - } - }, - "com.unity.modules.uielementsnative": { - "version": "1.0.0", - "depth": 1, - "source": "builtin", - "dependencies": { - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - } - }, - "com.unity.modules.umbra": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.unityanalytics": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - } - }, - "com.unity.modules.unitywebrequest": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.unitywebrequestassetbundle": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0" - } - }, - "com.unity.modules.unitywebrequestaudio": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.audio": "1.0.0" - } - }, - "com.unity.modules.unitywebrequesttexture": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0" - } - }, - "com.unity.modules.unitywebrequestwww": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.unitywebrequestassetbundle": "1.0.0", - "com.unity.modules.unitywebrequestaudio": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.assetbundle": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0" - } - }, - "com.unity.modules.vehicles": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.physics": "1.0.0" - } - }, - "com.unity.modules.video": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.ui": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0" - } - }, - "com.unity.modules.vr": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.xr": "1.0.0" - } - }, - "com.unity.modules.wind": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.modules.xr": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": { - "com.unity.modules.physics": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.subsystems": "1.0.0" - } - } - } -} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset deleted file mode 100644 index 9ec6744..0000000 --- a/ProjectSettings/AudioManager.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!11 &1 -AudioManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Volume: 1 - Rolloff Scale: 1 - Doppler Factor: 1 - Default Speaker Mode: 2 - m_SampleRate: 0 - m_DSPBufferSize: 1024 - m_VirtualVoiceCount: 512 - m_RealVoiceCount: 32 - m_SpatializerPlugin: - m_AmbisonicDecoderPlugin: - m_DisableAudio: 0 - m_VirtualizeEffects: 1 - m_RequestedDSPBufferSize: 0 diff --git a/ProjectSettings/BurstAotSettings_StandaloneWindows.json b/ProjectSettings/BurstAotSettings_StandaloneWindows.json deleted file mode 100644 index b7a0348..0000000 --- a/ProjectSettings/BurstAotSettings_StandaloneWindows.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "MonoBehaviour": { - "Version": 3, - "EnableBurstCompilation": true, - "EnableOptimisations": true, - "EnableSafetyChecks": false, - "EnableDebugInAllBuilds": false, - "UsePlatformSDKLinker": false, - "CpuMinTargetX32": 0, - "CpuMaxTargetX32": 0, - "CpuMinTargetX64": 0, - "CpuMaxTargetX64": 0, - "CpuTargetsX32": 2147483647, - "CpuTargetsX64": 2147483647 - } -} diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset deleted file mode 100644 index a84cf4e..0000000 --- a/ProjectSettings/ClusterInputManager.asset +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!236 &1 -ClusterInputManager: - m_ObjectHideFlags: 0 - m_Inputs: [] diff --git a/ProjectSettings/CommonBurstAotSettings.json b/ProjectSettings/CommonBurstAotSettings.json deleted file mode 100644 index 3dffdba..0000000 --- a/ProjectSettings/CommonBurstAotSettings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "MonoBehaviour": { - "Version": 3, - "DisabledWarnings": "" - } -} diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset deleted file mode 100644 index c936530..0000000 --- a/ProjectSettings/DynamicsManager.asset +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!55 &1 -PhysicsManager: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_Gravity: {x: 0, y: -9.81, z: 0} - m_DefaultMaterial: {fileID: 0} - m_BounceThreshold: 2 - m_DefaultMaxDepenetrationVelocity: 10 - m_SleepThreshold: 0.005 - m_DefaultContactOffset: 0.01 - m_DefaultSolverIterations: 6 - m_DefaultSolverVelocityIterations: 1 - m_QueriesHitBackfaces: 0 - m_QueriesHitTriggers: 1 - m_EnableAdaptiveForce: 0 - m_ClothInterCollisionDistance: 0.1 - m_ClothInterCollisionStiffness: 0.2 - m_ContactsGeneration: 1 - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - m_AutoSimulation: 1 - m_AutoSyncTransforms: 0 - m_ReuseCollisionCallbacks: 1 - m_ClothInterCollisionSettingsToggle: 0 - m_ClothGravity: {x: 0, y: -9.81, z: 0} - m_ContactPairsMode: 0 - m_BroadphaseType: 0 - m_WorldBounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 250, y: 250, z: 250} - m_WorldSubdivisions: 8 - m_FrictionType: 0 - m_EnableEnhancedDeterminism: 0 - m_EnableUnifiedHeightmaps: 1 - m_SolverType: 0 - m_DefaultMaxAngularSpeed: 50 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset deleted file mode 100644 index 62c5a75..0000000 --- a/ProjectSettings/EditorBuildSettings.asset +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1045 &1 -EditorBuildSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Scenes: - - enabled: 1 - path: Assets/Scenes/SampleScene.unity - guid: 2cda990e2423bbf4892e6590ba056729 - m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset deleted file mode 100644 index 9d4f51a..0000000 --- a/ProjectSettings/EditorSettings.asset +++ /dev/null @@ -1,40 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!159 &1 -EditorSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_SerializationMode: 2 - m_LineEndingsForNewScripts: 0 - m_DefaultBehaviorMode: 1 - m_PrefabRegularEnvironment: {fileID: 0} - m_PrefabUIEnvironment: {fileID: 0} - m_SpritePackerMode: 4 - m_SpritePackerPaddingPower: 1 - m_EtcTextureCompressorBehavior: 1 - m_EtcTextureFastCompressor: 1 - m_EtcTextureNormalCompressor: 2 - m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp - m_ProjectGenerationRootNamespace: - m_EnableTextureStreamingInEditMode: 1 - m_EnableTextureStreamingInPlayMode: 1 - m_AsyncShaderCompilation: 1 - m_CachingShaderPreprocessor: 1 - m_PrefabModeAllowAutoSave: 1 - m_EnterPlayModeOptionsEnabled: 0 - m_EnterPlayModeOptions: 3 - m_GameObjectNamingDigits: 1 - m_GameObjectNamingScheme: 0 - m_AssetNamingUsesSpace: 1 - m_UseLegacyProbeSampleCount: 0 - m_SerializeInlineMappingsOnOneLine: 1 - m_DisableCookiesInLightmapper: 1 - m_AssetPipelineMode: 1 - m_CacheServerMode: 0 - m_CacheServerEndpoint: - m_CacheServerNamespacePrefix: default - m_CacheServerEnableDownload: 1 - m_CacheServerEnableUpload: 1 - m_CacheServerEnableAuth: 0 - m_CacheServerEnableTls: 0 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset deleted file mode 100644 index 074cffe..0000000 --- a/ProjectSettings/GraphicsSettings.asset +++ /dev/null @@ -1,64 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!30 &1 -GraphicsSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_Deferred: - m_Mode: 1 - m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} - m_DeferredReflections: - m_Mode: 1 - m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} - m_ScreenSpaceShadows: - m_Mode: 1 - m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} - m_LegacyDeferred: - m_Mode: 1 - m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} - m_DepthNormals: - m_Mode: 1 - m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} - m_MotionVectors: - m_Mode: 1 - m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} - m_LightHalo: - m_Mode: 1 - m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} - m_LensFlare: - m_Mode: 1 - m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} - m_VideoShadersIncludeMode: 2 - m_AlwaysIncludedShaders: - - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} - m_PreloadedShaders: [] - m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_CustomRenderPipeline: {fileID: 0} - m_TransparencySortMode: 0 - m_TransparencySortAxis: {x: 0, y: 0, z: 1} - m_DefaultRenderingPath: 1 - m_DefaultMobileRenderingPath: 1 - m_TierSettings: [] - m_LightmapStripping: 0 - m_FogStripping: 0 - m_InstancingStripping: 0 - m_LightmapKeepPlain: 1 - m_LightmapKeepDirCombined: 1 - m_LightmapKeepDynamicPlain: 1 - m_LightmapKeepDynamicDirCombined: 1 - m_LightmapKeepShadowMask: 1 - m_LightmapKeepSubtractive: 1 - m_FogKeepLinear: 1 - m_FogKeepExp: 1 - m_FogKeepExp2: 1 - m_AlbedoSwatchInfos: [] - m_LightsUseLinearIntensity: 0 - m_LightsUseColorTemperature: 0 - m_DefaultRenderingLayerMask: 1 - m_LogWhenShaderIsCompiled: 0 diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset deleted file mode 100644 index 9e959c3..0000000 --- a/ProjectSettings/InputManager.asset +++ /dev/null @@ -1,487 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!13 &1 -InputManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Axes: - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: a - altPositiveButton: d - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: s - altPositiveButton: w - gravity: 3 - dead: 0.001 - sensitivity: 3 - snap: 1 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: mouse 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: mouse 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: mouse 2 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: space - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse X - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse Y - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Mouse ScrollWheel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0 - sensitivity: 0.1 - snap: 0 - invert: 0 - type: 1 - axis: 2 - joyNum: 0 - - serializedVersion: 3 - m_Name: Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 0 - type: 2 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: - altNegativeButton: - altPositiveButton: - gravity: 0 - dead: 0.19 - sensitivity: 1 - snap: 0 - invert: 1 - type: 2 - axis: 1 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 0 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 1 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Fire3 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 2 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Jump - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: joystick button 3 - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Submit - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: enter - altNegativeButton: - altPositiveButton: space - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Cancel - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: escape - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Enable Debug Button 1 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left ctrl - altNegativeButton: - altPositiveButton: joystick button 8 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Enable Debug Button 2 - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: backspace - altNegativeButton: - altPositiveButton: joystick button 9 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Reset - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left alt - altNegativeButton: - altPositiveButton: joystick button 1 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Next - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: page down - altNegativeButton: - altPositiveButton: joystick button 5 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Previous - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: page up - altNegativeButton: - altPositiveButton: joystick button 4 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Validate - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: return - altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Persistent - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: right shift - altNegativeButton: - altPositiveButton: joystick button 2 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Multiplier - descriptiveName: - descriptiveNegativeName: - negativeButton: - positiveButton: left shift - altNegativeButton: - altPositiveButton: joystick button 3 - gravity: 0 - dead: 0 - sensitivity: 0 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 0 - axis: 0 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Vertical - descriptiveName: - descriptiveNegativeName: - negativeButton: down - positiveButton: up - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 2 - axis: 6 - joyNum: 0 - - serializedVersion: 3 - m_Name: Debug Horizontal - descriptiveName: - descriptiveNegativeName: - negativeButton: left - positiveButton: right - altNegativeButton: - altPositiveButton: - gravity: 1000 - dead: 0.001 - sensitivity: 1000 - snap: 0 - invert: 0 - type: 2 - axis: 5 - joyNum: 0 diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset deleted file mode 100644 index 9d5c94b..0000000 --- a/ProjectSettings/NavMeshAreas.asset +++ /dev/null @@ -1,93 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!126 &1 -NavMeshProjectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - areas: - - name: Walkable - cost: 1 - - name: Not Walkable - cost: 1 - - name: Jump - cost: 2 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - - name: - cost: 1 - m_LastAgentTypeID: -887442657 - m_Settings: - - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.75 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_SettingNames: - - Humanoid diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset deleted file mode 100644 index e9cd578..0000000 --- a/ProjectSettings/NetworkManager.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!149 &1 -NetworkManager: - m_ObjectHideFlags: 0 - m_DebugLevel: 0 - m_Sendrate: 15 - m_AssetToPrefab: {} diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset deleted file mode 100644 index 084b3ae..0000000 --- a/ProjectSettings/PackageManagerSettings.asset +++ /dev/null @@ -1,45 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &1 -MonoBehaviour: - m_ObjectHideFlags: 61 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_EnablePreReleasePackages: 1 - m_EnablePackageDependencies: 0 - m_AdvancedSettingsExpanded: 1 - m_ScopedRegistriesSettingsExpanded: 0 - m_SeeAllPackageVersions: 0 - oneTimeWarningShown: 1 - m_Registries: - - m_Id: main - m_Name: - m_Url: https://packages.unity.com - m_Scopes: [] - m_IsDefault: 1 - m_Capabilities: 7 - m_UserSelectedRegistryName: - m_UserAddingNewScopedRegistry: 0 - m_RegistryInfoDraft: - m_ErrorMessage: - m_Original: - m_Id: - m_Name: - m_Url: - m_Scopes: [] - m_IsDefault: 0 - m_Capabilities: 0 - m_Modified: 0 - m_Name: - m_Url: - m_Scopes: - - - m_SelectedScopeIndex: 0 - m_LoadAssets: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset deleted file mode 100644 index e03d3b2..0000000 --- a/ProjectSettings/Physics2DSettings.asset +++ /dev/null @@ -1,56 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!19 &1 -Physics2DSettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_Gravity: {x: 0, y: 0} - m_DefaultMaterial: {fileID: 0} - m_VelocityIterations: 3 - m_PositionIterations: 8 - m_VelocityThreshold: 1 - m_MaxLinearCorrection: 0.2 - m_MaxAngularCorrection: 8 - m_MaxTranslationSpeed: 100 - m_MaxRotationSpeed: 360 - m_BaumgarteScale: 0.2 - m_BaumgarteTimeOfImpactScale: 0.75 - m_TimeToSleep: 0.1 - m_LinearSleepTolerance: 1 - m_AngularSleepTolerance: 2 - m_DefaultContactOffset: 0.01 - m_JobOptions: - serializedVersion: 2 - useMultithreading: 1 - useConsistencySorting: 0 - m_InterpolationPosesPerJob: 100 - m_NewContactsPerJob: 30 - m_CollideContactsPerJob: 100 - m_ClearFlagsPerJob: 200 - m_ClearBodyForcesPerJob: 200 - m_SyncDiscreteFixturesPerJob: 50 - m_SyncContinuousFixturesPerJob: 50 - m_FindNearestContactsPerJob: 100 - m_UpdateTriggerContactsPerJob: 100 - m_IslandSolverCostThreshold: 100 - m_IslandSolverBodyCostScale: 1 - m_IslandSolverContactCostScale: 10 - m_IslandSolverJointCostScale: 10 - m_IslandSolverBodiesPerJob: 50 - m_IslandSolverContactsPerJob: 50 - m_SimulationMode: 0 - m_QueriesHitTriggers: 1 - m_QueriesStartInColliders: 1 - m_CallbacksOnDisable: 1 - m_ReuseCollisionCallbacks: 1 - m_AutoSyncTransforms: 0 - m_AlwaysShowColliders: 0 - m_ShowColliderSleep: 1 - m_ShowColliderContacts: 0 - m_ShowColliderAABB: 0 - m_ContactArrowScale: 0.2 - m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} - m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} - m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} - m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} - m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset deleted file mode 100644 index 7d66f80..0000000 --- a/ProjectSettings/PresetManager.asset +++ /dev/null @@ -1,7 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1386491679 &1 -PresetManager: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_DefaultPresets: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset deleted file mode 100644 index 11abd08..0000000 --- a/ProjectSettings/ProjectSettings.asset +++ /dev/null @@ -1,647 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!129 &1 -PlayerSettings: - m_ObjectHideFlags: 0 - serializedVersion: 22 - productGUID: 158cc91512e9dbc56b113af4533a341e - AndroidProfiler: 0 - AndroidFilterTouchesWhenObscured: 0 - AndroidEnableSustainedPerformanceMode: 0 - defaultScreenOrientation: 4 - targetDevice: 2 - useOnDemandResources: 0 - accelerometerFrequency: 60 - companyName: DefaultCompany - productName: Petri - defaultCursor: {fileID: 0} - cursorHotspot: {x: 0, y: 0} - m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} - m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 - m_SplashScreenOverlayOpacity: 1 - m_SplashScreenAnimation: 1 - m_SplashScreenLogoStyle: 1 - m_SplashScreenDrawMode: 0 - m_SplashScreenBackgroundAnimationZoom: 1 - m_SplashScreenLogoAnimationZoom: 1 - m_SplashScreenBackgroundLandscapeAspect: 1 - m_SplashScreenBackgroundPortraitAspect: 1 - m_SplashScreenBackgroundLandscapeUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenBackgroundPortraitUvs: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - m_SplashScreenLogos: [] - m_VirtualRealitySplashScreen: {fileID: 0} - m_HolographicTrackingLossScreen: {fileID: 0} - defaultScreenWidth: 1920 - defaultScreenHeight: 1080 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 - m_StereoRenderingPath: 0 - m_ActiveColorSpace: 0 - m_MTRendering: 1 - mipStripping: 0 - numberOfMipsStripped: 0 - m_StackTraceTypes: 010000000100000001000000010000000100000001000000 - iosShowActivityIndicatorOnLoading: -1 - androidShowActivityIndicatorOnLoading: -1 - iosUseCustomAppBackgroundBehavior: 0 - iosAllowHTTPDownload: 1 - allowedAutorotateToPortrait: 1 - allowedAutorotateToPortraitUpsideDown: 1 - allowedAutorotateToLandscapeRight: 1 - allowedAutorotateToLandscapeLeft: 1 - useOSAutorotation: 1 - use32BitDisplayBuffer: 1 - preserveFramebufferAlpha: 0 - disableDepthAndStencilBuffers: 0 - androidStartInFullscreen: 1 - androidRenderOutsideSafeArea: 1 - androidUseSwappy: 1 - androidBlitType: 0 - defaultIsNativeResolution: 1 - macRetinaSupport: 1 - runInBackground: 0 - captureSingleScreen: 0 - muteOtherAudioSources: 0 - Prepare IOS For Recording: 0 - Force IOS Speakers When Recording: 0 - deferSystemGesturesMode: 0 - hideHomeButton: 0 - submitAnalytics: 1 - usePlayerLog: 1 - bakeCollisionMeshes: 0 - forceSingleInstance: 0 - useFlipModelSwapchain: 1 - resizableWindow: 0 - useMacAppStoreValidation: 0 - macAppStoreCategory: public.app-category.games - gpuSkinning: 0 - xboxPIXTextureCapture: 0 - xboxEnableAvatar: 0 - xboxEnableKinect: 0 - xboxEnableKinectAutoTracking: 0 - xboxEnableFitness: 0 - visibleInBackground: 1 - allowFullscreenSwitch: 1 - fullscreenMode: 1 - xboxSpeechDB: 0 - xboxEnableHeadOrientation: 0 - xboxEnableGuest: 0 - xboxEnablePIXSampling: 0 - metalFramebufferOnly: 0 - xboxOneResolution: 0 - xboxOneSResolution: 0 - xboxOneXResolution: 3 - xboxOneMonoLoggingLevel: 0 - xboxOneLoggingLevel: 1 - xboxOneDisableEsram: 0 - xboxOneEnableTypeOptimization: 0 - xboxOnePresentImmediateThreshold: 0 - switchQueueCommandMemory: 1048576 - switchQueueControlMemory: 16384 - switchQueueComputeMemory: 262144 - switchNVNShaderPoolsGranularity: 33554432 - switchNVNDefaultPoolsGranularity: 16777216 - switchNVNOtherPoolsGranularity: 16777216 - switchNVNMaxPublicTextureIDCount: 0 - switchNVNMaxPublicSamplerIDCount: 0 - stadiaPresentMode: 0 - stadiaTargetFramerate: 0 - vulkanNumSwapchainBuffers: 3 - vulkanEnableSetSRGBWrite: 0 - vulkanEnablePreTransform: 0 - vulkanEnableLateAcquireNextImage: 0 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 - bundleVersion: 1.0 - preloadedAssets: [] - metroInputSource: 0 - wsaTransparentSwapchain: 0 - m_HolographicPauseOnTrackingLoss: 1 - xboxOneDisableKinectGpuReservation: 1 - xboxOneEnable7thCore: 1 - vrSettings: - enable360StereoCapture: 0 - isWsaHolographicRemotingEnabled: 0 - enableFrameTimingStats: 0 - useHDRDisplay: 0 - D3DHDRBitDepth: 0 - m_ColorGamuts: 00000000 - targetPixelDensity: 30 - resolutionScalingMode: 0 - androidSupportedAspectRatio: 1 - androidMaxAspectRatio: 2.1 - applicationIdentifier: - Standalone: com.DefaultCompany.2DProject - buildNumber: - Standalone: 0 - iPhone: 0 - tvOS: 0 - overrideDefaultApplicationIdentifier: 1 - AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 19 - AndroidTargetSdkVersion: 0 - AndroidPreferredInstallLocation: 1 - aotOptions: - stripEngineCode: 1 - iPhoneStrippingLevel: 0 - iPhoneScriptCallOptimization: 0 - ForceInternetPermission: 0 - ForceSDCardPermission: 0 - CreateWallpaper: 0 - APKExpansionFiles: 0 - keepLoadedShadersAlive: 0 - StripUnusedMeshComponents: 0 - VertexChannelCompressionMask: 4054 - iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 11.0 - tvOSSdkVersion: 0 - tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 11.0 - uIPrerenderedIcon: 0 - uIRequiresPersistentWiFi: 0 - uIRequiresFullScreen: 1 - uIStatusBarHidden: 1 - uIExitOnSuspend: 0 - uIStatusBarStyle: 0 - appleTVSplashScreen: {fileID: 0} - appleTVSplashScreen2x: {fileID: 0} - tvOSSmallIconLayers: [] - tvOSSmallIconLayers2x: [] - tvOSLargeIconLayers: [] - tvOSLargeIconLayers2x: [] - tvOSTopShelfImageLayers: [] - tvOSTopShelfImageLayers2x: [] - tvOSTopShelfImageWideLayers: [] - tvOSTopShelfImageWideLayers2x: [] - iOSLaunchScreenType: 0 - iOSLaunchScreenPortrait: {fileID: 0} - iOSLaunchScreenLandscape: {fileID: 0} - iOSLaunchScreenBackgroundColor: - serializedVersion: 2 - rgba: 0 - iOSLaunchScreenFillPct: 100 - iOSLaunchScreenSize: 100 - iOSLaunchScreenCustomXibPath: - iOSLaunchScreeniPadType: 0 - iOSLaunchScreeniPadImage: {fileID: 0} - iOSLaunchScreeniPadBackgroundColor: - serializedVersion: 2 - rgba: 0 - iOSLaunchScreeniPadFillPct: 100 - iOSLaunchScreeniPadSize: 100 - iOSLaunchScreeniPadCustomXibPath: - iOSLaunchScreenCustomStoryboardPath: - iOSLaunchScreeniPadCustomStoryboardPath: - iOSDeviceRequirements: [] - iOSURLSchemes: [] - iOSBackgroundModes: 0 - iOSMetalForceHardShadows: 0 - metalEditorSupport: 1 - metalAPIValidation: 1 - iOSRenderExtraFrameOnPause: 0 - iosCopyPluginsCodeInsteadOfSymlink: 0 - appleDeveloperTeamID: - iOSManualSigningProvisioningProfileID: - tvOSManualSigningProvisioningProfileID: - iOSManualSigningProvisioningProfileType: 0 - tvOSManualSigningProvisioningProfileType: 0 - appleEnableAutomaticSigning: 0 - iOSRequireARKit: 0 - iOSAutomaticallyDetectAndAddCapabilities: 1 - appleEnableProMotion: 0 - shaderPrecisionModel: 0 - clonedFromGUID: 10ad67313f4034357812315f3c407484 - templatePackageId: com.unity.template.2d@6.0.0 - templateDefaultScene: Assets/Scenes/SampleScene.unity - useCustomMainManifest: 0 - useCustomLauncherManifest: 0 - useCustomMainGradleTemplate: 0 - useCustomLauncherGradleManifest: 0 - useCustomBaseGradleTemplate: 0 - useCustomGradlePropertiesTemplate: 0 - useCustomProguardFile: 0 - AndroidTargetArchitectures: 1 - AndroidSplashScreenScale: 0 - androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: - AndroidBuildApkPerCpuArchitecture: 0 - AndroidTVCompatibility: 0 - AndroidIsGame: 1 - AndroidEnableTango: 0 - androidEnableBanner: 1 - androidUseLowAccuracyLocation: 0 - androidUseCustomKeystore: 0 - m_AndroidBanners: - - width: 320 - height: 180 - banner: {fileID: 0} - androidGamepadSupportLevel: 0 - AndroidMinifyWithR8: 0 - AndroidMinifyRelease: 0 - AndroidMinifyDebug: 0 - AndroidValidateAppBundleSize: 1 - AndroidAppBundleSizeToValidate: 150 - m_BuildTargetIcons: [] - m_BuildTargetPlatformIcons: [] - m_BuildTargetBatching: [] - m_BuildTargetGraphicsJobs: - - m_BuildTarget: MacStandaloneSupport - m_GraphicsJobs: 0 - - m_BuildTarget: Switch - m_GraphicsJobs: 0 - - m_BuildTarget: MetroSupport - m_GraphicsJobs: 0 - - m_BuildTarget: AppleTVSupport - m_GraphicsJobs: 0 - - m_BuildTarget: BJMSupport - m_GraphicsJobs: 0 - - m_BuildTarget: LinuxStandaloneSupport - m_GraphicsJobs: 0 - - m_BuildTarget: PS4Player - m_GraphicsJobs: 0 - - m_BuildTarget: iOSSupport - m_GraphicsJobs: 0 - - m_BuildTarget: WindowsStandaloneSupport - m_GraphicsJobs: 0 - - m_BuildTarget: XboxOnePlayer - m_GraphicsJobs: 0 - - m_BuildTarget: LuminSupport - m_GraphicsJobs: 0 - - m_BuildTarget: AndroidPlayer - m_GraphicsJobs: 0 - - m_BuildTarget: WebGLSupport - m_GraphicsJobs: 0 - m_BuildTargetGraphicsJobMode: [] - m_BuildTargetGraphicsAPIs: - - m_BuildTarget: AndroidPlayer - m_APIs: 150000000b000000 - m_Automatic: 0 - - m_BuildTarget: iOSSupport - m_APIs: 10000000 - m_Automatic: 1 - m_BuildTargetVRSettings: [] - openGLRequireES31: 0 - openGLRequireES31AEP: 0 - openGLRequireES32: 0 - m_TemplateCustomTags: {} - mobileMTRendering: - Android: 1 - iPhone: 1 - tvOS: 1 - m_BuildTargetGroupLightmapEncodingQuality: [] - m_BuildTargetGroupLightmapSettings: [] - m_BuildTargetNormalMapEncoding: [] - playModeTestRunnerEnabled: 0 - runPlayModeTestAsEditModeTest: 0 - actionOnDotNetUnhandledException: 1 - enableInternalProfiler: 0 - logObjCUncaughtExceptions: 1 - enableCrashReportAPI: 0 - cameraUsageDescription: - locationUsageDescription: - microphoneUsageDescription: - switchNMETAOverride: - switchNetLibKey: - switchSocketMemoryPoolSize: 6144 - switchSocketAllocatorPoolSize: 128 - switchSocketConcurrencyLimit: 14 - switchScreenResolutionBehavior: 2 - switchUseCPUProfiler: 0 - switchUseGOLDLinker: 0 - switchLTOSetting: 0 - switchApplicationID: 0x01004b9000490000 - switchNSODependencies: - switchTitleNames_0: - switchTitleNames_1: - switchTitleNames_2: - switchTitleNames_3: - switchTitleNames_4: - switchTitleNames_5: - switchTitleNames_6: - switchTitleNames_7: - switchTitleNames_8: - switchTitleNames_9: - switchTitleNames_10: - switchTitleNames_11: - switchTitleNames_12: - switchTitleNames_13: - switchTitleNames_14: - switchTitleNames_15: - switchPublisherNames_0: - switchPublisherNames_1: - switchPublisherNames_2: - switchPublisherNames_3: - switchPublisherNames_4: - switchPublisherNames_5: - switchPublisherNames_6: - switchPublisherNames_7: - switchPublisherNames_8: - switchPublisherNames_9: - switchPublisherNames_10: - switchPublisherNames_11: - switchPublisherNames_12: - switchPublisherNames_13: - switchPublisherNames_14: - switchPublisherNames_15: - switchIcons_0: {fileID: 0} - switchIcons_1: {fileID: 0} - switchIcons_2: {fileID: 0} - switchIcons_3: {fileID: 0} - switchIcons_4: {fileID: 0} - switchIcons_5: {fileID: 0} - switchIcons_6: {fileID: 0} - switchIcons_7: {fileID: 0} - switchIcons_8: {fileID: 0} - switchIcons_9: {fileID: 0} - switchIcons_10: {fileID: 0} - switchIcons_11: {fileID: 0} - switchIcons_12: {fileID: 0} - switchIcons_13: {fileID: 0} - switchIcons_14: {fileID: 0} - switchIcons_15: {fileID: 0} - switchSmallIcons_0: {fileID: 0} - switchSmallIcons_1: {fileID: 0} - switchSmallIcons_2: {fileID: 0} - switchSmallIcons_3: {fileID: 0} - switchSmallIcons_4: {fileID: 0} - switchSmallIcons_5: {fileID: 0} - switchSmallIcons_6: {fileID: 0} - switchSmallIcons_7: {fileID: 0} - switchSmallIcons_8: {fileID: 0} - switchSmallIcons_9: {fileID: 0} - switchSmallIcons_10: {fileID: 0} - switchSmallIcons_11: {fileID: 0} - switchSmallIcons_12: {fileID: 0} - switchSmallIcons_13: {fileID: 0} - switchSmallIcons_14: {fileID: 0} - switchSmallIcons_15: {fileID: 0} - switchManualHTML: - switchAccessibleURLs: - switchLegalInformation: - switchMainThreadStackSize: 1048576 - switchPresenceGroupId: - switchLogoHandling: 0 - switchReleaseVersion: 0 - switchDisplayVersion: 1.0.0 - switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 - switchSupportedLanguagesMask: 0 - switchLogoType: 0 - switchApplicationErrorCodeCategory: - switchUserAccountSaveDataSize: 0 - switchUserAccountSaveDataJournalSize: 0 - switchApplicationAttribute: 0 - switchCardSpecSize: -1 - switchCardSpecClock: -1 - switchRatingsMask: 0 - switchRatingsInt_0: 0 - switchRatingsInt_1: 0 - switchRatingsInt_2: 0 - switchRatingsInt_3: 0 - switchRatingsInt_4: 0 - switchRatingsInt_5: 0 - switchRatingsInt_6: 0 - switchRatingsInt_7: 0 - switchRatingsInt_8: 0 - switchRatingsInt_9: 0 - switchRatingsInt_10: 0 - switchRatingsInt_11: 0 - switchRatingsInt_12: 0 - switchLocalCommunicationIds_0: - switchLocalCommunicationIds_1: - switchLocalCommunicationIds_2: - switchLocalCommunicationIds_3: - switchLocalCommunicationIds_4: - switchLocalCommunicationIds_5: - switchLocalCommunicationIds_6: - switchLocalCommunicationIds_7: - switchParentalControl: 0 - switchAllowsScreenshot: 1 - switchAllowsVideoCapturing: 1 - switchAllowsRuntimeAddOnContentInstall: 0 - switchDataLossConfirmation: 0 - switchUserAccountLockEnabled: 0 - switchSystemResourceMemory: 16777216 - switchSupportedNpadStyles: 22 - switchNativeFsCacheSize: 32 - switchIsHoldTypeHorizontal: 0 - switchSupportedNpadCount: 8 - switchSocketConfigEnabled: 0 - switchTcpInitialSendBufferSize: 32 - switchTcpInitialReceiveBufferSize: 64 - switchTcpAutoSendBufferSizeMax: 256 - switchTcpAutoReceiveBufferSizeMax: 256 - switchUdpSendBufferSize: 9 - switchUdpReceiveBufferSize: 42 - switchSocketBufferEfficiency: 4 - switchSocketInitializeEnabled: 1 - switchNetworkInterfaceManagerInitializeEnabled: 1 - switchPlayerConnectionEnabled: 1 - switchUseNewStyleFilepaths: 0 - switchUseMicroSleepForYield: 1 - switchMicroSleepForYieldTime: 25 - ps4NPAgeRating: 12 - ps4NPTitleSecret: - ps4NPTrophyPackPath: - ps4ParentalLevel: 11 - ps4ContentID: ED1633-NPXX51362_00-0000000000000000 - ps4Category: 0 - ps4MasterVersion: 01.00 - ps4AppVersion: 01.00 - ps4AppType: 0 - ps4ParamSfxPath: - ps4VideoOutPixelFormat: 0 - ps4VideoOutInitialWidth: 1920 - ps4VideoOutBaseModeInitialWidth: 1920 - ps4VideoOutReprojectionRate: 60 - ps4PronunciationXMLPath: - ps4PronunciationSIGPath: - ps4BackgroundImagePath: - ps4StartupImagePath: - ps4StartupImagesFolder: - ps4IconImagesFolder: - ps4SaveDataImagePath: - ps4SdkOverride: - ps4BGMPath: - ps4ShareFilePath: - ps4ShareOverlayImagePath: - ps4PrivacyGuardImagePath: - ps4ExtraSceSysFile: - ps4NPtitleDatPath: - ps4RemotePlayKeyAssignment: -1 - ps4RemotePlayKeyMappingDir: - ps4PlayTogetherPlayerCount: 0 - ps4EnterButtonAssignment: 2 - ps4ApplicationParam1: 0 - ps4ApplicationParam2: 0 - ps4ApplicationParam3: 0 - ps4ApplicationParam4: 0 - ps4DownloadDataSize: 0 - ps4GarlicHeapSize: 2048 - ps4ProGarlicHeapSize: 2560 - playerPrefsMaxSize: 32768 - ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh - ps4pnSessions: 1 - ps4pnPresence: 1 - ps4pnFriends: 1 - ps4pnGameCustomData: 1 - playerPrefsSupport: 0 - enableApplicationExit: 0 - resetTempFolder: 1 - restrictedAudioUsageRights: 0 - ps4UseResolutionFallback: 0 - ps4ReprojectionSupport: 0 - ps4UseAudio3dBackend: 0 - ps4UseLowGarlicFragmentationMode: 1 - ps4SocialScreenEnabled: 0 - ps4ScriptOptimizationLevel: 2 - ps4Audio3dVirtualSpeakerCount: 14 - ps4attribCpuUsage: 0 - ps4PatchPkgPath: - ps4PatchLatestPkgPath: - ps4PatchChangeinfoPath: - ps4PatchDayOne: 0 - ps4attribUserManagement: 0 - ps4attribMoveSupport: 0 - ps4attrib3DSupport: 0 - ps4attribShareSupport: 0 - ps4attribExclusiveVR: 0 - ps4disableAutoHideSplash: 0 - ps4videoRecordingFeaturesUsed: 0 - ps4contentSearchFeaturesUsed: 0 - ps4CompatibilityPS5: 0 - ps4GPU800MHz: 1 - ps4attribEyeToEyeDistanceSettingVR: 0 - ps4IncludedModules: [] - ps4attribVROutputEnabled: 0 - monoEnv: - splashScreenBackgroundSourceLandscape: {fileID: 0} - splashScreenBackgroundSourcePortrait: {fileID: 0} - blurSplashScreenBackground: 1 - spritePackerPolicy: - webGLMemorySize: 32 - webGLExceptionSupport: 1 - webGLNameFilesAsHashes: 0 - webGLDataCaching: 1 - webGLDebugSymbols: 0 - webGLEmscriptenArgs: - webGLModulesDirectory: - webGLTemplate: APPLICATION:Default - webGLAnalyzeBuildSize: 0 - webGLUseEmbeddedResources: 0 - webGLCompressionFormat: 0 - webGLWasmArithmeticExceptions: 0 - webGLLinkerTarget: 1 - webGLThreadsSupport: 0 - webGLDecompressionFallback: 0 - scriptingDefineSymbols: {} - additionalCompilerArguments: {} - platformArchitecture: {} - scriptingBackend: {} - il2cppCompilerConfiguration: {} - managedStrippingLevel: {} - incrementalIl2cppBuild: {} - suppressCommonWarnings: 1 - allowUnsafeCode: 0 - useDeterministicCompilation: 1 - enableRoslynAnalyzers: 1 - additionalIl2CppArgs: - scriptingRuntimeVersion: 1 - gcIncremental: 1 - assemblyVersionValidation: 1 - gcWBarrierValidation: 0 - apiCompatibilityLevelPerPlatform: {} - m_RenderingPath: 1 - m_MobileRenderingPath: 1 - metroPackageName: 2D_BuiltInRenderer - metroPackageVersion: - metroCertificatePath: - metroCertificatePassword: - metroCertificateSubject: - metroCertificateIssuer: - metroCertificateNotAfter: 0000000000000000 - metroApplicationDescription: 2D_BuiltInRenderer - wsaImages: {} - metroTileShortName: - metroTileShowName: 0 - metroMediumTileShowName: 0 - metroLargeTileShowName: 0 - metroWideTileShowName: 0 - metroSupportStreamingInstall: 0 - metroLastRequiredScene: 0 - metroDefaultTileSize: 1 - metroTileForegroundText: 2 - metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} - metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} - metroSplashScreenUseBackgroundColor: 0 - platformCapabilities: {} - metroTargetDeviceFamilies: {} - metroFTAName: - metroFTAFileTypes: [] - metroProtocolName: - XboxOneProductId: - XboxOneUpdateKey: - XboxOneSandboxId: - XboxOneContentId: - XboxOneTitleId: - XboxOneSCId: - XboxOneGameOsOverridePath: - XboxOnePackagingOverridePath: - XboxOneAppManifestOverridePath: - XboxOneVersion: 1.0.0.0 - XboxOnePackageEncryption: 0 - XboxOnePackageUpdateGranularity: 2 - XboxOneDescription: - XboxOneLanguage: - - enus - XboxOneCapability: [] - XboxOneGameRating: {} - XboxOneIsContentPackage: 0 - XboxOneEnhancedXboxCompatibilityMode: 0 - XboxOneEnableGPUVariability: 1 - XboxOneSockets: {} - XboxOneSplashScreen: {fileID: 0} - XboxOneAllowedProductIds: [] - XboxOnePersistentLocalStorageSize: 0 - XboxOneXTitleMemory: 8 - XboxOneOverrideIdentityName: - XboxOneOverrideIdentityPublisher: - vrEditorSettings: {} - cloudServicesEnabled: {} - luminIcon: - m_Name: - m_ModelFolderPath: - m_PortalFolderPath: - luminCert: - m_CertPath: - m_SignPackage: 1 - luminIsChannelApp: 0 - luminVersion: - m_VersionCode: 1 - m_VersionName: - apiCompatibilityLevel: 6 - activeInputHandler: 0 - cloudProjectId: - framebufferDepthMemorylessMode: 0 - qualitySettingsNames: [] - projectName: - organizationId: - cloudEnabled: 0 - legacyClampBlendShapeWeights: 0 - virtualTexturingSupportEnabled: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt deleted file mode 100644 index b6a2213..0000000 --- a/ProjectSettings/ProjectVersion.txt +++ /dev/null @@ -1,2 +0,0 @@ -m_EditorVersion: 2021.1.12f1 -m_EditorVersionWithRevision: 2021.1.12f1 (afcadd793de6) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset deleted file mode 100644 index 3df7d83..0000000 --- a/ProjectSettings/QualitySettings.asset +++ /dev/null @@ -1,236 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!47 &1 -QualitySettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_CurrentQuality: 5 - m_QualitySettings: - - serializedVersion: 2 - name: Very Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 15 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - skinWeights: 1 - textureQuality: 1 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.3 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Low - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - skinWeights: 2 - textureQuality: 0 - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 0 - lodBias: 0.4 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 16 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Medium - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - skinWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - vSyncCount: 1 - lodBias: 0.7 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: High - pixelLightCount: 2 - shadows: 2 - shadowResolution: 1 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 40 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - skinWeights: 2 - textureQuality: 0 - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 256 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Very High - pixelLightCount: 3 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 2 - shadowDistance: 70 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - skinWeights: 4 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 1.5 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 1024 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - - serializedVersion: 2 - name: Ultra - pixelLightCount: 4 - shadows: 2 - shadowResolution: 2 - shadowProjection: 1 - shadowCascades: 4 - shadowDistance: 150 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 1 - skinWeights: 255 - textureQuality: 0 - anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 - softVegetation: 1 - realtimeReflectionProbes: 1 - billboardsFaceCameraPosition: 1 - vSyncCount: 1 - lodBias: 2 - maximumLODLevel: 0 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 4096 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 0} - excludedTargetPlatforms: [] - m_PerPlatformDefaultQuality: - Android: 2 - Lumin: 5 - Nintendo Switch: 5 - PS4: 5 - Stadia: 5 - Standalone: 5 - WebGL: 3 - Windows Store Apps: 5 - XboxOne: 5 - iPhone: 2 - tvOS: 2 diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json deleted file mode 100644 index 6f3e60f..0000000 --- a/ProjectSettings/SceneTemplateSettings.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "templatePinStates": [], - "dependencyTypeInfos": [ - { - "userAdded": false, - "type": "UnityEngine.AnimationClip", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEditor.Animations.AnimatorController", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.AnimatorOverrideController", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEditor.Audio.AudioMixerController", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.ComputeShader", - "ignore": true, - "defaultInstantiationMode": 1, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Cubemap", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.GameObject", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEditor.LightingDataAsset", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": false - }, - { - "userAdded": false, - "type": "UnityEngine.LightingSettings", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Material", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEditor.MonoScript", - "ignore": true, - "defaultInstantiationMode": 1, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.PhysicMaterial", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.PhysicsMaterial2D", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Rendering.VolumeProfile", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEditor.SceneAsset", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": false - }, - { - "userAdded": false, - "type": "UnityEngine.Shader", - "ignore": true, - "defaultInstantiationMode": 1, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.ShaderVariantCollection", - "ignore": true, - "defaultInstantiationMode": 1, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Texture", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Texture2D", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - }, - { - "userAdded": false, - "type": "UnityEngine.Timeline.TimelineAsset", - "ignore": false, - "defaultInstantiationMode": 0, - "supportsModification": true - } - ], - "defaultDependencyTypeInfo": { - "userAdded": false, - "type": "", - "ignore": false, - "defaultInstantiationMode": 1, - "supportsModification": true - }, - "newSceneOverride": 0 -} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset deleted file mode 100644 index 2f82da2..0000000 --- a/ProjectSettings/TagManager.asset +++ /dev/null @@ -1,46 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!78 &1 -TagManager: - serializedVersion: 2 - tags: [] - layers: - - Default - - TransparentFX - - Ignore Raycast - - - - Water - - UI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - - name: Behind - uniqueID: 1040396627 - locked: 0 - - name: Default - uniqueID: 0 - locked: 0 diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset deleted file mode 100644 index 6b1a4c4..0000000 --- a/ProjectSettings/TimeManager.asset +++ /dev/null @@ -1,9 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!5 &1 -TimeManager: - m_ObjectHideFlags: 0 - Fixed Timestep: 0.02 - Maximum Allowed Timestep: 0.33333334 - m_TimeScale: 1 - Maximum Particle Timestep: 0.03 diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset deleted file mode 100644 index 6125b30..0000000 --- a/ProjectSettings/UnityConnectSettings.asset +++ /dev/null @@ -1,35 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - serializedVersion: 1 - m_Enabled: 0 - m_TestMode: 0 - m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events - m_EventUrl: https://cdp.cloud.unity3d.com/v1/events - m_ConfigUrl: https://config.uca.cloud.unity3d.com - m_DashboardUrl: https://dashboard.unity3d.com - m_TestInitMode: 0 - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com - m_Enabled: 0 - m_LogBufferSize: 10 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 0 - m_TestMode: 0 - m_InitializeOnStartup: 1 - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_IosGameId: - m_AndroidGameId: - m_GameIds: {} - m_GameId: - PerformanceReportingSettings: - m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset deleted file mode 100644 index e44b38d..0000000 --- a/ProjectSettings/VFXManager.asset +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!937362698 &1 -VFXManager: - m_ObjectHideFlags: 0 - m_IndirectShader: {fileID: 0} - m_CopyBufferShader: {fileID: 0} - m_SortShader: {fileID: 0} - m_StripUpdateShader: {fileID: 0} - m_RenderPipeSettingsPath: - m_FixedTimeStep: 0.016666668 - m_MaxDeltaTime: 0.05 - m_CompiledVersion: 0 - m_RuntimeVersion: 0 diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset deleted file mode 100644 index 840d9ff..0000000 --- a/ProjectSettings/VersionControlSettings.asset +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!890905787 &1 -VersionControlSettings: - m_ObjectHideFlags: 0 - m_Mode: Visible Meta Files - m_CollabEditorSettings: - inProgressEnabled: 1 diff --git a/ProjectSettings/XRSettings.asset b/ProjectSettings/XRSettings.asset deleted file mode 100644 index b6d892b..0000000 --- a/ProjectSettings/XRSettings.asset +++ /dev/null @@ -1,10 +0,0 @@ -{ - "m_SettingKeys": [ - "VR Device Disabled", - "VR Device User Alert" - ], - "m_SettingValues": [ - "False", - "False" - ] -} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f1636a --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +![](particles.gif) + +# Petri +WIP particle life simulation in Rust + +# Requirements +LLD for linking +```Bash +sudo apt install lld +``` + +## Running +```Bash +cargo run --release -- ./configs/default.ron +``` \ No newline at end of file diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset deleted file mode 100644 index 9287014..0000000 --- a/UserSettings/EditorUserSettings.asset +++ /dev/null @@ -1,27 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!162 &1 -EditorUserSettings: - m_ObjectHideFlags: 0 - serializedVersion: 4 - m_ConfigSettings: - RecentlyUsedScenePath-0: - value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d - flags: 0 - RecentlyUsedScenePath-1: - value: 22424703114646680e0b0227036c72111f19563f22213229 - flags: 0 - vcSharedLogLevel: - value: 0d5e400f0650 - flags: 0 - m_VCAutomaticAdd: 1 - m_VCDebugCom: 0 - m_VCDebugCmd: 0 - m_VCDebugOut: 0 - m_SemanticMergeMode: 2 - m_VCShowFailedCheckout: 1 - m_VCOverwriteFailedCheckoutAssets: 1 - m_VCProjectOverlayIcons: 1 - m_VCHierarchyOverlayIcons: 1 - m_VCOtherOverlayIcons: 1 - m_VCAllowAsyncUpdate: 1 diff --git a/UserSettings/Search.settings b/UserSettings/Search.settings deleted file mode 100644 index 9e26dfe..0000000 --- a/UserSettings/Search.settings +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/configs/default.ron b/configs/default.ron new file mode 100644 index 0000000..1df547a --- /dev/null +++ b/configs/default.ron @@ -0,0 +1,12 @@ +Config( + n_cells: 600_000, + cell_radius: 2.0, + bounds: ( + ( 0.0, 0.0), + (8192.0, 8192.0), + ), + spatial_hash_cell_size: 32, + + max_render_fps: 144, + max_sim_tps: 144, +) \ No newline at end of file diff --git a/particles.gif b/particles.gif new file mode 100644 index 0000000..e8c8676 Binary files /dev/null and b/particles.gif differ diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..330f41c --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,8 @@ +brace_style = "SameLineWhere" +condense_wildcard_suffixes = true +fn_params_layout = "Tall" +hard_tabs = false +imports_indent = "Block" +imports_granularity = "Crate" +group_imports = "StdExternalCrate" +max_width = 120 \ No newline at end of file diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..92a77a8 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,42 @@ +use std::{env, fs::File}; + +use bevy_ecs::prelude::*; +use glam::Vec2; +use ron::de::from_reader; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Deserialize, Serialize, Clone, Copy, Resource)] +pub struct Config { + // Cells + pub n_cells: u32, + pub cell_radius: f32, + + // Simulation + pub bounds: (Vec2, Vec2), + pub spatial_hash_cell_size: usize, + + // Misc + pub max_render_fps: u64, + pub max_sim_tps: u64, +} + +pub fn build_config() -> Config { + let args: Vec = env::args().collect(); + + if args.len() < 2 { + println!("Please provide a config file"); + println!("Usage: {} ", args[0]); + std::process::exit(1); + } + + let f = File::open(&args[1]).expect("Failed opening file"); + let config: Config = match from_reader(f) { + Ok(x) => x, + Err(e) => { + println!("Failed to load config: {e}"); + std::process::exit(1); + } + }; + + config +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..40a6e30 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,41 @@ +pub mod config; +pub mod rendering; +pub mod simulation; +pub mod timing; + +use winit::{ + event::Event::*, + event_loop::{ControlFlow, EventLoop}, +}; + +use crate::{config::build_config, rendering::RenderDriver, simulation::Simulation}; + +fn main() { + let mut simulation = Simulation::new(build_config()); + + let event_loop = EventLoop::new(); + let mut renderer = RenderDriver::new(&mut simulation, &event_loop); + + event_loop.run(move |event, _, control_flow| { + *control_flow = ControlFlow::Poll; + + // Forward event to renderers + // renderer.handle_event(&mut simulation, &event); + + match event { + // Rendering + RedrawRequested(..) => renderer.render(&mut simulation), + MainEventsCleared => { + if simulation.should_step() { + simulation.step(); + } + if renderer.should_redraw(simulation.get_config()) { + renderer.request_render() + } + } + // Handle changes to wndow + WindowEvent { event, .. } => renderer.handle_window_event(&event, control_flow), + _ => {} + } + }); +} diff --git a/src/rendering/display.rs b/src/rendering/display.rs new file mode 100644 index 0000000..b34af13 --- /dev/null +++ b/src/rendering/display.rs @@ -0,0 +1,92 @@ +// Heavily borrowed from Learn-WGPU +// https://github.com/sotrh/learn-wgpu/tree/master/code/showcase/framework + +use futures::executor::block_on; +use wgpu::{SurfaceError, SurfaceTexture, TextureView}; +use winit::{event_loop::EventLoop, window::Window}; + +use crate::rendering::sim_renderer::camera::Camera; + +pub struct Display { + pub surface: wgpu::Surface, + pub surface_config: wgpu::SurfaceConfiguration, + pub device: wgpu::Device, + pub queue: wgpu::Queue, + pub window: Window, + + pub cam: Camera, +} + +const INITIAL_WIDTH: u32 = 1280; +const INITIAL_HEIGHT: u32 = 720; + +impl Display { + pub fn new(event_loop: &EventLoop<()>) -> Self { + let window = winit::window::WindowBuilder::new() + .with_decorations(true) + .with_resizable(true) + .with_transparent(false) + .with_title("Petri") + .with_inner_size(winit::dpi::PhysicalSize::new(INITIAL_WIDTH, INITIAL_HEIGHT)) + .build(event_loop) + .unwrap(); + + let size = window.inner_size(); + let instance = wgpu::Instance::default(); + let surface = unsafe { instance.create_surface(&window).unwrap() }; + let adapter = block_on(instance.request_adapter(&wgpu::RequestAdapterOptions { + power_preference: wgpu::PowerPreference::HighPerformance, + compatible_surface: Some(&surface), + force_fallback_adapter: false, + })) + .unwrap(); + let (device, queue) = block_on(adapter.request_device( + &wgpu::DeviceDescriptor { + label: None, + features: wgpu::Features::POLYGON_MODE_POINT, + limits: wgpu::Limits::default(), + }, + None, + )) + .unwrap(); + + let surface_config = wgpu::SurfaceConfiguration { + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + format: surface.get_capabilities(&adapter).formats[0], + width: size.width, + height: size.height, + present_mode: wgpu::PresentMode::Immediate, + alpha_mode: wgpu::CompositeAlphaMode::Auto, + view_formats: vec![wgpu::TextureFormat::Bgra8UnormSrgb], + }; + + Self { + surface_config, + surface, + window, + device, + queue, + cam: Camera::default(), + } + } + + pub fn resize(&mut self, width: u32, height: u32) { + self.surface_config.width = width; + self.surface_config.height = height; + self.surface.configure(&self.device, &self.surface_config); + } + + pub fn get_frame(&self) -> Result<(SurfaceTexture, TextureView), SurfaceError> { + let frame = match self.surface.get_current_texture() { + Ok(frame) => frame, + Err(_) => { + self.surface.configure(&self.device, &self.surface_config); + self.surface + .get_current_texture() + .expect("Failed to acquire next surface texture!") + } + }; + let view = frame.texture.create_view(&wgpu::TextureViewDescriptor::default()); + Ok((frame, view)) + } +} diff --git a/src/rendering/gui_apps/grid_app.rs b/src/rendering/gui_apps/grid_app.rs new file mode 100644 index 0000000..7c0af3b --- /dev/null +++ b/src/rendering/gui_apps/grid_app.rs @@ -0,0 +1,75 @@ +use egui::epaint::Color32; +use egui_plot::{Line, Plot, PlotPoints, PlotUi}; + +use crate::{ + config::Config, + rendering::Display, + simulation::{DenseGrid, Simulation}, +}; + +#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))] +pub struct GridApp { + pub visible: bool, +} + +impl Default for GridApp { + fn default() -> Self { + Self { visible: true } + } +} + +impl GridApp { + pub fn update(&mut self, ui: &mut egui::Ui, display: &mut Display, simulation: &Simulation) { + let base_plot = self.build_base_plot(display); + base_plot.show(ui, |plot_ui| { + self.show_sim_grid(plot_ui, simulation); + self.show_spatial_grid(plot_ui, simulation); + + display.cam.update(plot_ui); + }); + } + + pub fn show_sim_grid(&self, plot_ui: &mut PlotUi, simulation: &Simulation) { + let config = simulation.world.get_resource::().unwrap(); + let (minx, miny) = (config.bounds.0.x as f64, config.bounds.0.y as f64); + let (maxx, maxy) = (config.bounds.1.x as f64, config.bounds.1.y as f64); + + let path = vec![[minx, miny], [maxx, miny], [maxx, maxy], [minx, maxy], [minx, miny]]; + + let bounding_box = Line::new(PlotPoints::from(path)).color(Color32::RED); + + plot_ui.line(bounding_box); + } + + pub fn show_spatial_grid(&self, plot_ui: &mut PlotUi, simulation: &Simulation) { + let grid = simulation.world.get_resource::().unwrap(); + + let config = simulation.world.get_resource::().unwrap(); + let (minx, miny) = (config.bounds.0.x as f64, config.bounds.0.y as f64); + let (maxx, maxy) = (config.bounds.1.x as f64, config.bounds.1.y as f64); + + // Draw vertical lines + for i in 1..grid.ncells_side { + let x = (i * grid.cell_size) as f64; + let path = vec![[x, miny], [x, maxy]]; + let line = Line::new(PlotPoints::from(path)).color(Color32::LIGHT_BLUE); + plot_ui.line(line); + } + + // Draw horizontal lines + for i in 1..grid.ncells_side { + let y = (i * grid.cell_size) as f64; + let path = vec![[minx, y], [maxx, y]]; + let line = Line::new(PlotPoints::from(path)).color(Color32::LIGHT_BLUE); + plot_ui.line(line); + } + } + + fn build_base_plot(&self, _display: &Display) -> Plot { + Plot::new("SimGrid") + .show_background(false) + .allow_zoom(true) + .allow_drag(true) + .data_aspect(1.0) + } +} diff --git a/src/rendering/gui_apps/gui_renderer.rs b/src/rendering/gui_apps/gui_renderer.rs new file mode 100644 index 0000000..9f024fb --- /dev/null +++ b/src/rendering/gui_apps/gui_renderer.rs @@ -0,0 +1,125 @@ +use egui::{style::Margin, Color32, Frame}; +use egui_wgpu::renderer::{Renderer, ScreenDescriptor}; +use egui_winit::State; +use wgpu::TextureView; +use winit::event_loop::EventLoop; + +use crate::{ + rendering::{ + gui_apps::{GridApp, PerfApp, StatApp}, + sim_renderer::SimRenderer, + Display, + }, + simulation::Simulation, +}; + +pub struct GUIRenderer { + pub state: State, + pub context: egui::Context, + pub rpass: Renderer, + debug: StatApp, + grid: GridApp, + perf: PerfApp, +} + +impl GUIRenderer { + pub fn new(display: &Display, _simulation: &mut Simulation, event_loop: &EventLoop<()>) -> Self { + let state = egui_winit::State::new(event_loop); + let context = egui::Context::default(); + context.set_pixels_per_point(display.window.scale_factor() as f32); + + let egui_rpass = Renderer::new(&display.device, display.surface_config.format, None, 1); + + Self { + context, + state, + rpass: egui_rpass, + debug: StatApp, + grid: GridApp::default(), + perf: PerfApp, + } + } + + pub fn pre_render(&mut self, display: &Display) { + let input = self.state.take_egui_input(&display.window); + self.context.begin_frame(input); + } + + pub fn render(&mut self, display: &mut Display, simulation: &mut Simulation, sim_renderer: &mut SimRenderer) { + let lpanel = egui::SidePanel::left("Debug Info"); + let rpanel = egui::SidePanel::right("Debug Info"); + let cpanel = egui::CentralPanel::default().frame( + Frame::dark_canvas(&self.context.style()) + .fill(Color32::TRANSPARENT) + .inner_margin(Margin::same(0.0)), + ); + + lpanel.show(&self.context, |ui| { + self.debug.update(ui, display, simulation); + }); + + rpanel.show(&self.context, |ui| { + self.perf.update(ui, display, simulation); + }); + + cpanel.show(&self.context, |ui| { + self.grid.update(ui, display, simulation); + sim_renderer.render(display, simulation, &mut self.rpass, ui) + }); + } + + pub fn post_render(&mut self, display: &Display, view: &TextureView) { + // End the UI frame. We could now handle the output and draw the UI with the backend. + let output = self.context.end_frame(); + let paint_jobs = self.context.tessellate(output.shapes); + + let mut encoder = display.device.create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("GUI Encoder"), + }); + + // Upload all resources for the GPU. + let screen_descriptor = ScreenDescriptor { + size_in_pixels: [display.surface_config.width, display.surface_config.height], + pixels_per_point: display.window.scale_factor() as f32, + }; + + for (id, image_delta) in &output.textures_delta.set { + self.rpass + .update_texture(&display.device, &display.queue, *id, image_delta); + } + for id in &output.textures_delta.free { + self.rpass.free_texture(id); + } + self.rpass.update_buffers( + &display.device, + &display.queue, + &mut encoder, + &paint_jobs, + &screen_descriptor, + ); + { + // Set up render pass and associate the render pipeline we made + let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("Render Pass"), + color_attachments: &[Some(wgpu::RenderPassColorAttachment { + view, + resolve_target: None, + ops: wgpu::Operations { + load: wgpu::LoadOp::Clear(wgpu::Color { + r: 0.0, + g: 0.0, + b: 0.0, + a: 1.0, + }), + store: true, + }, + })], + depth_stencil_attachment: None, + }); + + self.rpass.render(&mut render_pass, &paint_jobs, &screen_descriptor); + } + + display.queue.submit(std::iter::once(encoder.finish())); + } +} diff --git a/src/rendering/gui_apps/mod.rs b/src/rendering/gui_apps/mod.rs new file mode 100644 index 0000000..a4c4b43 --- /dev/null +++ b/src/rendering/gui_apps/mod.rs @@ -0,0 +1,9 @@ +mod grid_app; +pub mod gui_renderer; +mod perf_app; +mod stat_app; + +pub use grid_app::GridApp; +pub use gui_renderer::GUIRenderer; +pub use perf_app::PerfApp; +pub use stat_app::StatApp; diff --git a/src/rendering/gui_apps/perf_app.rs b/src/rendering/gui_apps/perf_app.rs new file mode 100644 index 0000000..627a9ab --- /dev/null +++ b/src/rendering/gui_apps/perf_app.rs @@ -0,0 +1,80 @@ +use std::collections::HashMap; + +use crate::{ + rendering::Display, + simulation::{Simulation, Ticker}, + timing::{timer::Timer, TIMING_DATABASE}, +}; + +pub struct PerfApp; + +impl PerfApp { + pub fn update(&mut self, ui: &mut egui::Ui, _display: &Display, simulation: &Simulation) { + // Reset timer at 10th tick to ignore startup lag + if simulation.world.get_resource::().unwrap().tick == 100 { + for v in TIMING_DATABASE.lock().unwrap().values_mut() { + v.reset(); + } + } + + ui.style_mut().wrap = Some(false); + self.draw(ui) + } + + fn draw(&self, ui: &mut egui::Ui) { + let database = TIMING_DATABASE.lock().unwrap(); + // Map to (system, stage, timer) + + let mut map = HashMap::new(); + for (string, timers) in database.iter() { + let splits: Vec<&str> = string.split('.').collect(); + let system = splits[0]; + let stage = splits[1]; + + map.entry(system).or_insert_with(Vec::default).push((stage, timers)); + } + + // collect into vector of [(system, (stage, timer)), ..] + let mut vec = Vec::new(); + for (system, stages) in map.iter() { + vec.push((*system, stages.clone())); + } + + // sort by system + vec.sort_by(|a, b| a.0.cmp(b.0)); + + for (i, (sys, stages)) in vec.clone().iter_mut().enumerate() { + stages.sort_by_key(|(_, timer)| timer.raw_imean()); + stages.reverse(); + egui::Grid::new(format!("{sys:} Grid")) + .striped(true) + .num_columns(4) + .show(ui, |ui| { + ui.heading(*sys); + ui.heading("Mean"); + ui.heading("Min"); + ui.heading("Max"); + ui.end_row(); + for (stage, timer) in stages.iter() { + draw_system(ui, stage, timer); + ui.end_row(); + } + }); + + if i != vec.len() - 1 { + ui.separator(); + } + } + } +} + +// Function to draw the performance info for one system +fn draw_system(ui: &mut egui::Ui, stage: &str, timer: &Timer) { + let (mean, mean_str) = timer.mean(); + let (min, min_str) = timer.min(); + let (max, max_str) = timer.max(); + ui.label(stage); + ui.label(format!("{mean} ({mean_str})")); + ui.label(format!("{min} ({min_str})")); + ui.label(format!("{max} ({max_str})")); +} diff --git a/src/rendering/gui_apps/stat_app.rs b/src/rendering/gui_apps/stat_app.rs new file mode 100644 index 0000000..68f9d57 --- /dev/null +++ b/src/rendering/gui_apps/stat_app.rs @@ -0,0 +1,93 @@ +use egui; +use num_format::{Locale, ToFormattedString}; + +use crate::{ + config::Config, + rendering::Display, + simulation::{Simulation, Ticker}, +}; + +#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))] +pub struct StatApp; + +impl StatApp { + pub fn update(&mut self, ui: &mut egui::Ui, display: &Display, simulation: &Simulation) { + let time = simulation.world.get_resource::().unwrap(); + let config = simulation.get_config(); + let cam = &display.cam; + + ui.heading("Stats"); + ui.separator(); + egui::Grid::new("Stats Grid") + .striped(true) + .num_columns(2) + .show(ui, |ui| { + ui.label("Time:"); + ui.label(format!("{:.2}", time.time_since_start().as_secs_f32())); + ui.end_row(); + + ui.label("Ticks / s:"); + ui.label(format!("{:}", time.tick_rate)); + ui.end_row(); + + ui.label("Entities:"); + ui.label(simulation.world.entities().len().to_formatted_string(&Locale::en)); + ui.end_row(); + }); + + ui.heading("Camera"); + ui.separator(); + egui::Grid::new("Camera Grid") + .striped(true) + .num_columns(2) + .show(ui, |ui| { + ui.label("World X Bounds:"); + ui.label(format!("({:.2}, {:.2})", cam.world_xbounds.x, cam.world_xbounds.y)); + ui.end_row(); + + ui.label("World Y Bounds:"); + ui.label(format!("({:.2}, {:.2})", cam.world_ybounds.x, cam.world_ybounds.y)); + ui.end_row(); + + ui.label("Screen width:"); + ui.label(format!("{:}", cam.screen_width)); + ui.end_row(); + + ui.label("Screen height:"); + ui.label(format!("{:}", cam.screen_height)); + ui.end_row(); + }); + + self.show_config(ui, config); + } + + fn show_config(&self, ui: &mut egui::Ui, config: &Config) { + ui.heading("Config"); + ui.separator(); + let grid = egui::Grid::new("Config Grid").striped(true).num_columns(2); + grid.show(ui, |ui| { + ui.label("N Cells:"); + ui.label(config.n_cells.to_formatted_string(&Locale::en)); + ui.end_row(); + + ui.label("Cell Radius:"); + ui.label(format!("{:.2}", config.cell_radius)); + ui.end_row(); + + ui.label("Bounds:"); + ui.label(format!( + "({:}, {:}) | ({:}, {:})", + config.bounds.0.x, config.bounds.0.y, config.bounds.1.x, config.bounds.1.y + )); + ui.end_row(); + + ui.label("Max Render FPS:"); + ui.label(format!("{:}", config.max_render_fps)); + ui.end_row(); + + ui.label("Max Sim TPS:"); + ui.label(format!("{:}", config.max_sim_tps)); + ui.end_row(); + }); + } +} diff --git a/src/rendering/mod.rs b/src/rendering/mod.rs new file mode 100644 index 0000000..be9c590 --- /dev/null +++ b/src/rendering/mod.rs @@ -0,0 +1,9 @@ +mod display; +mod gui_apps; +pub mod render_driver; +mod sim_renderer; + +use display::*; +use gui_apps::*; +pub use render_driver::RenderDriver; +use sim_renderer::*; diff --git a/src/rendering/render_driver.rs b/src/rendering/render_driver.rs new file mode 100644 index 0000000..b2027b6 --- /dev/null +++ b/src/rendering/render_driver.rs @@ -0,0 +1,79 @@ +use winit::{ + event::WindowEvent::*, + event_loop::{ControlFlow, EventLoop}, +}; + +use crate::{ + config::Config, + rendering::{Display, GUIRenderer, SimRenderer}, + simulation::{Simulation, Ticker}, +}; + +pub struct RenderDriver { + pub display: Display, + pub sim_renderer: SimRenderer, + pub gui_renderer: GUIRenderer, + pub ticker: Ticker, +} + +impl RenderDriver { + pub fn new(simulation: &mut Simulation, event_loop: &EventLoop<()>) -> Self { + let display = Display::new(event_loop); + + let mut gui_renderer = GUIRenderer::new(&display, simulation, event_loop); + let sim_renderer = SimRenderer::new(&display, simulation, &mut gui_renderer.rpass); + + Self { + display, + sim_renderer, + gui_renderer, + ticker: Ticker::default(), + } + } + + pub fn render(&mut self, simulation: &mut Simulation) { + self.ticker.tick(); + + let (frame, view) = self.display.get_frame().unwrap(); + + self.gui_renderer.pre_render(&self.display); + self.gui_renderer + .render(&mut self.display, simulation, &mut self.sim_renderer); + self.gui_renderer.post_render(&self.display, &view); + + frame.present(); + } + + pub fn request_render(&mut self) { + self.display.window.request_redraw(); + } + + pub fn should_redraw(&self, config: &Config) -> bool { + let target_delta = 1.0 / (config.max_render_fps as f32); + if self.ticker.delta_time().as_secs_f32() > target_delta { + return true; + } + false + } +} + +// Event handling +impl RenderDriver { + pub fn handle_window_event(&mut self, event: &winit::event::WindowEvent, control_flow: &mut ControlFlow) { + let response = self.gui_renderer.state.on_event(&self.gui_renderer.context, event); + if response.consumed { + return; + } + + match event { + CloseRequested => *control_flow = ControlFlow::Exit, + ScaleFactorChanged { new_inner_size, .. } => { + self.display.resize(new_inner_size.width, new_inner_size.height); + } + Resized(new_inner_size) => { + self.display.resize(new_inner_size.width, new_inner_size.height); + } + _ => {} + } + } +} diff --git a/src/rendering/sim_renderer/camera.rs b/src/rendering/sim_renderer/camera.rs new file mode 100644 index 0000000..859e630 --- /dev/null +++ b/src/rendering/sim_renderer/camera.rs @@ -0,0 +1,50 @@ +use glam::Vec2; + +#[derive(Default)] +pub struct Camera { + pub world_xbounds: Vec2, + pub world_ybounds: Vec2, + pub screen_height: f32, + pub screen_width: f32, +} + +impl Camera { + pub fn update(&mut self, plot_ui: &egui_plot::PlotUi) { + let bounds = plot_ui.plot_bounds(); + let (minx, miny) = (bounds.min()[0], bounds.min()[1]); + let (maxx, maxy) = (bounds.max()[0], bounds.max()[1]); + self.world_xbounds = Vec2::new(minx as _, maxx as _); + self.world_ybounds = Vec2::new(miny as _, maxy as _); + self.screen_height = (plot_ui.screen_from_plot([minx, miny].into()) + - plot_ui.screen_from_plot([minx, maxy].into())) + .round() + .y; + self.screen_width = (plot_ui.screen_from_plot([maxx, miny].into()) + - plot_ui.screen_from_plot([minx, miny].into())) + .round() + .x; + } +} + +#[repr(C)] +#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable, Default)] +pub struct CameraUniform { + u_world_size: [f32; 2], + u_world_ll: [f32; 2], + u_screen_height: f32, + u_screen_width: f32, +} + +impl From<&Camera> for CameraUniform { + fn from(cam: &Camera) -> Self { + CameraUniform { + u_world_size: [ + cam.world_xbounds.y - cam.world_xbounds.x, + cam.world_ybounds.y - cam.world_ybounds.x, + ], + u_world_ll: [cam.world_xbounds.x, cam.world_ybounds.x], + u_screen_height: cam.screen_height, + u_screen_width: cam.screen_width, + } + } +} diff --git a/src/rendering/sim_renderer/mod.rs b/src/rendering/sim_renderer/mod.rs new file mode 100644 index 0000000..7c94aae --- /dev/null +++ b/src/rendering/sim_renderer/mod.rs @@ -0,0 +1,6 @@ +pub mod camera; +pub mod sim_renderer; +mod vertex; + +pub use sim_renderer::SimRenderer; +pub use vertex::{Vertex, VertexBuffer}; diff --git a/src/rendering/sim_renderer/shaders/particles.frag b/src/rendering/sim_renderer/shaders/particles.frag new file mode 100644 index 0000000..534b234 --- /dev/null +++ b/src/rendering/sim_renderer/shaders/particles.frag @@ -0,0 +1,29 @@ +#version 450 core + +layout (std140, binding=0) +uniform Camera { + vec2 u_world_size; + vec2 u_world_ll; + float u_screen_height; + float u_screen_width; +}; + +layout (location=0) in vec4 v_color; +layout (location=1) in vec2 v_pos; +layout (location=2) in float v_size; + +layout (location=0) out vec4 out_color; + +float edgeRamp(float x, float f, float d) { + return clamp(1.0 - f * (x - 1.0 + d + 1.0 / f), 0.0, 1.0); +} + +void main() { + float v = length(gl_PointCoord - 0.5); + float a = edgeRamp(v * 2.0, 35.0, 0.05); + if (a < 1e-9) { + discard; + } else { + out_color = vec4(v_color.rgb, a); + } +} \ No newline at end of file diff --git a/src/rendering/sim_renderer/shaders/particles.vert b/src/rendering/sim_renderer/shaders/particles.vert new file mode 100644 index 0000000..14a43bb --- /dev/null +++ b/src/rendering/sim_renderer/shaders/particles.vert @@ -0,0 +1,31 @@ +#version 450 core + +layout (std140, binding=0) +uniform Camera { + vec2 u_world_size; + vec2 u_world_ll; + float u_screen_height; + float u_screen_width; +}; + +layout (location=0) in vec2 a_pos; +layout (location=1) in vec4 a_color; +layout (location=2) in float a_size; + +layout (location=0) out vec4 v_color; +layout (location=1) out vec2 v_pos; +layout (location=2) out float v_size; + +void main() { + // Convert from world space to screen space [-1, 1] + vec2 pos = (a_pos - u_world_ll) / u_world_size * 2.0 - 1.0; + + v_color = a_color; + v_pos = pos; + + // Convert world space size to screen space size (in pixels) + v_size = a_size / u_world_size.x * u_screen_width * 2.0; + + gl_Position = vec4(pos, 0, 1); + gl_PointSize = v_size; +} \ No newline at end of file diff --git a/src/rendering/sim_renderer/sim_renderer.rs b/src/rendering/sim_renderer/sim_renderer.rs new file mode 100644 index 0000000..b3f833c --- /dev/null +++ b/src/rendering/sim_renderer/sim_renderer.rs @@ -0,0 +1,191 @@ +use bytemuck; +use egui_wgpu::Renderer; +use naga; +use wgpu::ShaderModuleDescriptor; + +use crate::{ + rendering::{camera::CameraUniform, Display, Vertex, VertexBuffer}, + simulation::Simulation, + timing::timer::time_func, +}; + +pub struct SimRenderer; + +impl SimRenderer { + pub fn new(display: &Display, _simulation: &mut Simulation, renderer: &mut egui_wgpu::Renderer) -> Self { + let uniforms_buffer_byte_size = std::mem::size_of::() as wgpu::BufferAddress; + let uniforms_ubo = display.device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Uniforms ubo"), + size: uniforms_buffer_byte_size, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + + let bind_group_layout = display + .device + .create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: Some("Bind group layout"), + entries: &[wgpu::BindGroupLayoutEntry { + binding: 0, + visibility: wgpu::ShaderStages::VERTEX, + ty: wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: wgpu::BufferSize::new(uniforms_buffer_byte_size), + }, + count: None, + }], + }); + let bind_group = display.device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("Bind group"), + layout: &bind_group_layout, + entries: &[wgpu::BindGroupEntry { + binding: 0, + resource: wgpu::BindingResource::Buffer(uniforms_ubo.as_entire_buffer_binding()), + }], + }); + + let shader_frag = &display.device.create_shader_module(ShaderModuleDescriptor { + label: Some("Fragment Shader"), + source: wgpu::ShaderSource::Glsl { + shader: std::borrow::Cow::Borrowed(include_str!("./shaders/particles.frag")), + stage: naga::ShaderStage::Fragment, + defines: Default::default(), + }, + }); + + let shader_vert = &display.device.create_shader_module(ShaderModuleDescriptor { + label: Some("Vertex Shader"), + source: wgpu::ShaderSource::Glsl { + shader: std::borrow::Cow::Borrowed(include_str!("./shaders/particles.vert")), + stage: naga::ShaderStage::Vertex, + defines: Default::default(), + }, + }); + + // Create render pipeline + let render_pipeline_layout = display.device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: Some("Render Pipeline Layout"), + bind_group_layouts: &[&bind_group_layout], + push_constant_ranges: &[], + }); + let render_pipeline = display.device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("Render Pipeline"), + layout: Some(&render_pipeline_layout), + multiview: None, + vertex: wgpu::VertexState { + module: shader_vert, + entry_point: "main", + buffers: &[wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::() as wgpu::BufferAddress, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x4, 2 => Float32], + }], + }, + fragment: Some(wgpu::FragmentState { + module: shader_frag, + entry_point: "main", + targets: &[Some(wgpu::ColorTargetState { + format: display.surface_config.format, + blend: Some(wgpu::BlendState::ALPHA_BLENDING), + write_mask: wgpu::ColorWrites::ALL, + })], + }), + primitive: wgpu::PrimitiveState { + topology: wgpu::PrimitiveTopology::PointList, + strip_index_format: None, + front_face: wgpu::FrontFace::Ccw, + cull_mode: None, + polygon_mode: wgpu::PolygonMode::Point, + unclipped_depth: false, + conservative: false, + }, + depth_stencil: None, + multisample: wgpu::MultisampleState::default(), + }); + + let resources = SimRenderResources::new(render_pipeline, bind_group, uniforms_ubo, display); + + renderer.callback_resources.insert(resources); + + Self {} + } + + pub fn render(&mut self, display: &Display, simulation: &mut Simulation, ctx: &mut Renderer, ui: &mut egui::Ui) { + time_func!("render.step"); + let cam_uniform = CameraUniform::from(&display.cam); + + let resources = ctx.callback_resources.get_mut::().unwrap(); + + resources.vertex_buffer.update(simulation); + resources.camera_uniform = cam_uniform; + + let rect = ui.min_rect(); + ui.painter() + .add(egui_wgpu::Callback::new_paint_callback(rect, SimDrawCallback {})); + } +} + +struct SimDrawCallback {} + +impl egui_wgpu::CallbackTrait for SimDrawCallback { + fn prepare( + &self, + device: &wgpu::Device, + queue: &wgpu::Queue, + _egui_encoder: &mut wgpu::CommandEncoder, + resources: &mut egui_wgpu::CallbackResources, + ) -> Vec { + let resources: &mut SimRenderResources = resources.get_mut().unwrap(); + resources.prepare(device, queue); + Vec::new() + } + + fn paint<'a>( + &self, + _info: egui::PaintCallbackInfo, + render_pass: &mut wgpu::RenderPass<'a>, + resources: &'a egui_wgpu::CallbackResources, + ) { + let resources: &SimRenderResources = resources.get().unwrap(); + resources.paint(render_pass); + } +} + +struct SimRenderResources { + pipeline: wgpu::RenderPipeline, + bind_group: wgpu::BindGroup, + uniform_buffer: wgpu::Buffer, + + vertex_buffer: VertexBuffer, + camera_uniform: CameraUniform, +} + +impl SimRenderResources { + fn new( + pipeline: wgpu::RenderPipeline, + bind_group: wgpu::BindGroup, + uniform_buffer: wgpu::Buffer, + display: &Display, + ) -> Self { + Self { + pipeline, + bind_group, + uniform_buffer, + vertex_buffer: VertexBuffer::default(display), + camera_uniform: CameraUniform::default(), + } + } + + fn prepare(&mut self, device: &wgpu::Device, queue: &wgpu::Queue) { + self.vertex_buffer.write(queue, device); + queue.write_buffer(&self.uniform_buffer, 0, bytemuck::cast_slice(&[self.camera_uniform])); + } + + fn paint<'rp>(&'rp self, render_pass: &mut wgpu::RenderPass<'rp>) { + render_pass.set_pipeline(&self.pipeline); + render_pass.set_vertex_buffer(0, self.vertex_buffer.buf.slice(..)); + render_pass.set_bind_group(0, &self.bind_group, &[]); + render_pass.draw(0..(self.vertex_buffer.cur_verticies.len() as u32), 0..1); + } +} diff --git a/src/rendering/sim_renderer/vertex.rs b/src/rendering/sim_renderer/vertex.rs new file mode 100644 index 0000000..f82225e --- /dev/null +++ b/src/rendering/sim_renderer/vertex.rs @@ -0,0 +1,75 @@ +use crate::{ + rendering::Display, + simulation::{Color, RigidCircle, Simulation}, + timing::timer::time_func, +}; + +#[repr(C)] +#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable, Default)] +pub struct Vertex { + position: [f32; 2], + color: [f32; 4], + radius: f32, +} + +impl Vertex { + pub fn new(circ: &RigidCircle, color: &[f32; 4]) -> Self { + Self { + position: circ.pos.into(), + color: *color, + radius: circ.radius, + } + } +} + +pub struct VertexBuffer { + pub buf: wgpu::Buffer, + pub cur_verticies: Vec, + pub size: usize, +} + +impl VertexBuffer { + pub fn default(display: &Display) -> VertexBuffer { + let size: usize = 3_000_000; + let init_alloc = std::mem::size_of::() * size; + + let vertex_buffer = display.device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Vertex buffer"), + size: init_alloc as wgpu::BufferAddress, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + + VertexBuffer { + buf: vertex_buffer, + size, + cur_verticies: Vec::with_capacity(size), + } + } + + pub fn update(&mut self, simulation: &mut Simulation) { + time_func!("render.vertex_update"); + + let mut query = simulation.world.query::<(&RigidCircle, &Color)>(); + self.cur_verticies.clear(); + self.cur_verticies.extend( + query + .iter(&simulation.world) + .map(|(circ, color)| Vertex::new(circ, &color.val)), + ); + } + + pub fn write(&mut self, queue: &wgpu::Queue, device: &wgpu::Device) { + let alloc_size = std::mem::size_of::() * self.cur_verticies.len(); + // reallocate if buffer is too small + if alloc_size > self.buf.size() as usize { + self.buf = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Vertex buffer"), + size: alloc_size as wgpu::BufferAddress, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + } + queue.write_buffer(&self.buf, 0, bytemuck::cast_slice(&self.cur_verticies)); + } +} diff --git a/src/simulation/components.rs b/src/simulation/components.rs new file mode 100644 index 0000000..84142f4 --- /dev/null +++ b/src/simulation/components.rs @@ -0,0 +1,49 @@ +use bevy_ecs::prelude::*; +use glam::Vec2; +use rand::prelude::*; + +use crate::config::Config; + +#[derive(Clone, Copy, Component)] +pub struct RigidCircle { + pub pos: Vec2, + pub vel: Vec2, + pub radius: f32, +} + +#[derive(Clone, Copy, Component)] +pub struct Color { + pub val: [f32; 4], +} + +impl RigidCircle { + pub fn new_rand(config: &Config) -> Self { + let bounds = config.bounds; + + let pos = Vec2::new( + thread_rng().gen_range(bounds.0.x..bounds.1.x), + thread_rng().gen_range(bounds.0.y..bounds.1.y), + ); + + let vel = Vec2::new(thread_rng().gen_range(-1.0..1.0), thread_rng().gen_range(-1.0..1.0)); + + Self { + pos, + vel, + radius: config.cell_radius, + } + } +} + +impl Color { + pub fn new_rand() -> Self { + Self { + val: [ + thread_rng().gen_range(0.0..1.0), + thread_rng().gen_range(0.0..1.0), + thread_rng().gen_range(0.0..1.0), + 1.0, + ], + } + } +} diff --git a/src/simulation/mod.rs b/src/simulation/mod.rs new file mode 100644 index 0000000..9b59241 --- /dev/null +++ b/src/simulation/mod.rs @@ -0,0 +1,9 @@ +mod components; +mod physics; +pub mod simulation; +mod time; + +pub use components::*; +pub use physics::{DenseGrid, PhysicsPipeline}; +pub use simulation::*; +pub use time::Ticker; diff --git a/src/simulation/physics/collision.rs b/src/simulation/physics/collision.rs new file mode 100644 index 0000000..8c32d1c --- /dev/null +++ b/src/simulation/physics/collision.rs @@ -0,0 +1,38 @@ +use bevy_ecs::prelude::*; +use glam::Vec2; + +use crate::{ + simulation::{physics::DenseGrid, RigidCircle}, + timing::timer::time_func, +}; + +pub fn grid_build(query: Query<(&RigidCircle, Entity)>, grid: Res) { + time_func!("physics.grid_build"); + + grid.clear(); + query.par_iter().for_each(|(circ, entity)| { + grid.insert(circ, entity); + }) +} + +pub fn collision_resolution(mut query: Query<(&mut RigidCircle, Entity)>, grid: Res) { + time_func!("physics.col_detect"); + query.par_iter_mut().for_each(|(mut circ, entity)| { + let around = grid.query(circ.pos, circ.radius, entity); + let impulse: Vec2 = around.iter().map(|e| singular_resolution(&circ, e)).sum(); + circ.vel += impulse; + }); +} + +fn singular_resolution(c1: &RigidCircle, c2: &RigidCircle) -> Vec2 { + let normal = (c2.pos - c1.pos).normalize(); + + let rel_vel = c2.vel - c1.vel; + let vel_along_norm = rel_vel.dot(normal); + + // Check if the circles are moving towards each other + if vel_along_norm > 0.0 { + return Vec2::ZERO; + } + vel_along_norm * normal +} diff --git a/src/simulation/physics/mod.rs b/src/simulation/physics/mod.rs new file mode 100644 index 0000000..47ee4f9 --- /dev/null +++ b/src/simulation/physics/mod.rs @@ -0,0 +1,7 @@ +mod collision; +pub mod physics; +mod position_update; +mod spatial_grid; + +pub use physics::PhysicsPipeline; +pub use spatial_grid::*; diff --git a/src/simulation/physics/physics.rs b/src/simulation/physics/physics.rs new file mode 100644 index 0000000..0f8c1ba --- /dev/null +++ b/src/simulation/physics/physics.rs @@ -0,0 +1,28 @@ +use bevy_ecs::prelude::*; + +use super::{ + collision::{collision_resolution, grid_build}, + position_update::update_positions, +}; +use crate::{config::Config, simulation::physics::DenseGrid, timing::timer::time_func}; +pub struct PhysicsPipeline { + schedule: Schedule, +} + +impl PhysicsPipeline { + pub fn new(world: &mut World, config: &Config) -> Self { + let grid = DenseGrid::new(config.spatial_hash_cell_size as i32, (config.bounds.1.x) as i32); + + let mut scheduler = Schedule::from_world(world); + scheduler.add_systems((update_positions, grid_build, collision_resolution).chain()); + scheduler.set_executor_kind(bevy_ecs::schedule::ExecutorKind::MultiThreaded); + + world.insert_resource(grid); + Self { schedule: scheduler } + } + + pub fn step(&mut self, world: &mut World) { + time_func!("physics.step"); + self.schedule.run(world); + } +} diff --git a/src/simulation/physics/position_update.rs b/src/simulation/physics/position_update.rs new file mode 100644 index 0000000..6daf0ec --- /dev/null +++ b/src/simulation/physics/position_update.rs @@ -0,0 +1,22 @@ +use bevy_ecs::prelude::*; + +use crate::{config::Config, simulation::RigidCircle, timing::timer::time_func}; + +pub fn update_positions(mut query: Query<&mut RigidCircle>, config: Res) { + time_func!("physics.pos_update"); + + let bounds = config.bounds; + + query.par_iter_mut().for_each(|mut circ| { + circ.pos = circ.pos + circ.vel; + + if ((circ.pos.x - circ.radius) <= bounds.0.x) || ((circ.pos.x + circ.radius) >= bounds.1.x) { + circ.vel.x = -circ.vel.x; + } + if ((circ.pos.y - circ.radius) <= bounds.0.y) || ((circ.pos.y + circ.radius) >= bounds.1.y) { + circ.vel.y = -circ.vel.y; + } + + circ.pos = circ.pos.clamp(bounds.0 + circ.radius, bounds.1 - circ.radius); + }); +} diff --git a/src/simulation/physics/spatial_grid.rs b/src/simulation/physics/spatial_grid.rs new file mode 100644 index 0000000..f555e07 --- /dev/null +++ b/src/simulation/physics/spatial_grid.rs @@ -0,0 +1,95 @@ +use bevy_ecs::prelude::*; +use glam::Vec2; +use rayon::prelude::*; + +use crate::simulation::RigidCircle; + +#[derive(Resource)] +pub struct DenseGrid { + pub cell_size: i32, + pub sim_size: i32, + pub ncells_side: i32, + + pub cells: Vec, +} + +impl DenseGrid { + pub fn new(cell_size: i32, sim_size: i32) -> Self { + let ncells_side = sim_size / cell_size; + Self { + cell_size, + sim_size, + cells: (0..(ncells_side * ncells_side)).map(|_| Cell::default()).collect(), + ncells_side, + } + } + + pub fn insert(&self, circ: &RigidCircle, entity: Entity) { + let ind = self.flat_ind(circ.pos); + let cell = self.cells.get(ind as usize).unwrap(); + cell.insert(circ, entity); + } + + pub fn flat_ind(&self, pos: Vec2) -> i32 { + let loc = pos.as_ivec2() / self.cell_size; + loc.y * self.ncells_side + loc.x + } + + pub fn clear(&self) { + self.cells.par_iter().for_each(|cell| cell.clear()); + } + + pub fn query(&self, pos: Vec2, radius: f32, ignore: Entity) -> Vec { + let mut hits = Vec::new(); + + for ind in self.cell_range(pos, radius) { + let cell = self.cells.get(ind).unwrap(); + // We know this is at a read only stage. Safe to disregard lock + hits.extend(cell.unlock_unsafe().iter().filter_map(|(other, id)| { + let hit = (pos - other.pos).length_squared() < (radius + other.radius).powi(2); + if (*id != ignore) && hit { + Some(*other) + } else { + None + } + })); + } + + hits + } + + pub fn cell_range(&self, pos: Vec2, radius: f32) -> impl Iterator { + let cs = self.cell_size as f32; + let nc = self.ncells_side as f32; + + let rc = pos / cs; + let radius = radius / cs; + + let rmin = (rc.y - radius).max(0.0) as i32; + let rmax = (rc.y + radius).min(nc - 1.0) as i32; + let cmin = (rc.x - radius).max(0.0) as i32; + let cmax = (rc.x + radius).min(nc - 1.0) as i32; + + let shift = self.ncells_side; + (rmin..=rmax).flat_map(move |r| (cmin..=cmax).map(move |c| (r * shift + c) as usize)) + } +} + +#[derive(Default)] +pub struct Cell { + ents: std::sync::Mutex>, +} + +impl Cell { + pub fn insert(&self, circ: &RigidCircle, entity: Entity) { + self.ents.lock().unwrap().push((*circ, entity)); + } + + pub fn clear(&self) { + self.ents.lock().unwrap().clear(); + } + + pub fn unlock_unsafe(&self) -> Vec<(RigidCircle, Entity)> { + self.ents.lock().unwrap().clone() + } +} diff --git a/src/simulation/simulation.rs b/src/simulation/simulation.rs new file mode 100644 index 0000000..2e43702 --- /dev/null +++ b/src/simulation/simulation.rs @@ -0,0 +1,60 @@ +use bevy_ecs::prelude::*; + +use crate::{ + config::Config, + simulation::{components, time::Ticker, PhysicsPipeline}, +}; + +pub struct Simulation { + pub world: World, + pub physics: PhysicsPipeline, +} + +impl Simulation { + pub fn new(config: Config) -> Simulation { + let mut world = World::default(); + + world.insert_resource(Ticker::default()); + world.insert_resource(config); + + for _i in 0..config.n_cells { + world.spawn(( + components::RigidCircle::new_rand(&config), + components::Color::new_rand(), + )); + } + + let physics = PhysicsPipeline::new(&mut world, &config); + + Simulation { world, physics } + } + + /// Returns false if the simulation should stop + pub fn step(&mut self) { + self._tick_timer(); + self.physics.step(&mut self.world); + } + + fn _tick_timer(&mut self) { + let mut timer = self.world.get_resource_mut::().unwrap(); + timer.tick(); + } + + pub fn get_config(&self) -> &Config { + return self.world.get_resource::().unwrap(); + } + + pub fn get_config_mut(&mut self) -> Mut { + let config = self.world.get_resource_mut::().unwrap(); + config + } + + pub fn should_step(&self) -> bool { + let target_delta = 1.0 / (self.get_config().max_sim_tps as f32); + let timer = self.world.get_resource::().unwrap(); + if timer.delta_time().as_secs_f32() > target_delta { + return true; + } + false + } +} diff --git a/src/simulation/time.rs b/src/simulation/time.rs new file mode 100644 index 0000000..d983ec0 --- /dev/null +++ b/src/simulation/time.rs @@ -0,0 +1,50 @@ +use std::time::Duration; + +use bevy_ecs::prelude::*; +use fps_counter::FPSCounter; +use quanta::Instant; + +#[derive(Resource)] +pub struct Ticker { + pub tick: u128, + pub start_time: Instant, + pub last_tick_time: Instant, + + pub tick_rate: usize, + tick_counter: FPSCounter, +} + +impl Default for Ticker { + fn default() -> Self { + let now = Instant::now(); + + Self { + tick: 0, + start_time: now, + last_tick_time: now, + tick_rate: 0, + tick_counter: FPSCounter::default(), + } + } +} + +#[allow(dead_code)] +impl Ticker { + pub fn tick(&mut self) { + self.tick += 1; + self.tick_rate = self.tick_counter.tick(); + self.last_tick_time = Instant::now(); + } + + pub fn time_since_start(&self) -> Duration { + Instant::now() - self.start_time + } + + pub fn delta_time(&self) -> Duration { + Instant::now() - self.last_tick_time + } + + pub fn now() -> Instant { + Instant::now() + } +} diff --git a/src/timing/mod.rs b/src/timing/mod.rs new file mode 100644 index 0000000..76851e5 --- /dev/null +++ b/src/timing/mod.rs @@ -0,0 +1,2 @@ +pub mod timer; +pub use timer::{DropTimer, TIMING_DATABASE}; diff --git a/src/timing/timer.rs b/src/timing/timer.rs new file mode 100644 index 0000000..9772f2e --- /dev/null +++ b/src/timing/timer.rs @@ -0,0 +1,98 @@ +use std::{collections::HashMap, sync::Mutex, time::Duration}; + +use hdrhistogram::Histogram; +use lazy_static::lazy_static; +use quanta::Instant; + +lazy_static! { + pub static ref TIMING_DATABASE: Mutex> = Mutex::new(HashMap::default()); +} + +pub struct Timer { + hist: Histogram, +} + +impl Timer { + pub fn new() -> Self { + Self { + hist: Histogram::new(2).unwrap(), + } + } + + pub fn update(&mut self, delta: Duration) { + let delta = delta.as_nanos() as u64; + self.hist.record(delta).unwrap(); + } + + pub fn min(&self) -> (u64, &str) { + self.time_to_readable(self.hist.min()) + } + + pub fn max(&self) -> (u64, &str) { + self.time_to_readable(self.hist.max()) + } + + pub fn mean(&self) -> (u64, &str) { + self.time_to_readable(self.hist.mean() as u64) + } + + pub fn raw_imean(&self) -> u64 { + self.hist.mean() as u64 + } + + pub fn reset(&mut self) { + self.hist.reset(); + } + + fn time_to_readable(&self, nano_seconds: u64) -> (u64, &str) { + let (time, unit) = if nano_seconds >= 1_000_000_000 { + (nano_seconds / 1_000_000_000, "s") + } else if nano_seconds >= 1_000_000 { + (nano_seconds / 1_000_000, "ms") + } else if nano_seconds >= 1_000 { + (nano_seconds / 1_000, "us") + } else { + (nano_seconds, "ns") + }; + (time, unit) + } +} + +impl Default for Timer { + fn default() -> Self { + Timer::new() + } +} + +pub struct DropTimer { + start: Instant, + target: String, +} + +impl DropTimer { + pub fn new(target: String) -> Self { + Self { + start: Instant::now(), + target, + } + } +} + +impl Drop for DropTimer { + fn drop(&mut self) { + TIMING_DATABASE + .lock() + .unwrap() + .entry(self.target.clone()) + .or_default() + .update(Instant::now() - self.start); + } +} + +macro_rules! time_func { + ($name:expr) => { + use crate::timing::DropTimer; + let __drop_timer = DropTimer::new($name.into()); + }; +} +pub(crate) use time_func;