This commit is contained in:
Pixel 2026-08-04 20:56:53 +02:00
parent d02e552328
commit d6b9c517d9
23 changed files with 2938 additions and 589 deletions

View file

@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: New Material m_Name: Test_Green
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
@ -129,8 +129,8 @@ Material:
- _XRMotionVectorsPass: 1 - _XRMotionVectorsPass: 1
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColor: {r: 0, g: 1, b: 0, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 0, g: 1, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

View file

@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7128443880667998594
MonoBehaviour:
m_ObjectHideFlags: 11
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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Test_Red
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0, a: 1}
- _Color: {r: 1, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5be67e6e3b8bc074182b97e61d8d4c37
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -119,6 +119,139 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &105983835
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 105983838}
- component: {fileID: 105983837}
- component: {fileID: 105983836}
m_Layer: 0
m_Name: Team2_Base
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &105983836
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 105983835}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b97066bf235990144b39e9bc214b1cca, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.PlayerEconomy
startingGold: 100
incomePerWave: 50
--- !u!114 &105983837
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 105983835}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2d4e074c26982c4c8752ff97c4654ed, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.BaseGrid
columns: 10
rows: 10
cellSize: 2
--- !u!4 &105983838
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 105983835}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 90, y: 2, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &190020080
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 190020083}
- component: {fileID: 190020082}
- component: {fileID: 190020081}
m_Layer: 0
m_Name: Team2_Shop
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &190020081
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190020080}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f49cec0c77e4fce4694ff6f19a72eea8, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.PlacementController
baseGrid: {fileID: 105983837}
economy: {fileID: 105983836}
shopUI: {fileID: 190020082}
shopUnits:
- {fileID: 11400000, guid: 3086cd18cc645174296981d67778f969, type: 2}
- {fileID: 11400000, guid: a1c5636849772f34e92425663d2dbc9c, type: 2}
targetCamera: {fileID: 0}
--- !u!114 &190020082
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190020080}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: acaf0cdd984399e44b7cb2114276e4c1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.ShopUI
economy: {fileID: 105983836}
placementController: {fileID: 190020081}
shopUnits:
- {fileID: 11400000, guid: 3086cd18cc645174296981d67778f969, type: 2}
- {fileID: 11400000, guid: a1c5636849772f34e92425663d2dbc9c, type: 2}
teamLabel: Team B
barRow: 1
--- !u!4 &190020083
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190020080}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 90.7, y: 0.5, z: -25.8}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &484453422 --- !u!1 &484453422
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -339,6 +472,7 @@ GameObject:
- component: {fileID: 1109898417} - component: {fileID: 1109898417}
- component: {fileID: 1109898416} - component: {fileID: 1109898416}
- component: {fileID: 1109898415} - component: {fileID: 1109898415}
- component: {fileID: 1109898418}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@ -413,13 +547,57 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1109898414} m_GameObject: {fileID: 1109898414}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.15304591, y: -0.6903456, z: 0.15304591, w: 0.6903456} m_LocalRotation: {x: 0.2933424, y: 0.636742, z: -0.28755635, w: 0.6525498}
m_LocalPosition: {x: 120, y: 30, z: 0} m_LocalPosition: {x: -113.66025, y: 15.64744, z: -1.2121267}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 25, y: -90, z: 0} m_LocalEulerAnglesHint: {x: 25, y: -90, z: 0}
--- !u!114 &1109898418
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1109898414}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!1 &1401811863 --- !u!1 &1401811863
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -456,6 +634,56 @@ Transform:
- {fileID: 2056509223} - {fileID: 2056509223}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1418310696
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1418310698}
- component: {fileID: 1418310697}
m_Layer: 0
m_Name: WaveManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1418310697
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1418310696}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf2b749247b4c2e4ead03cd9a384c4b3, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.WaveManager
bootstrap: {fileID: 1460528677}
team0Grid: {fileID: 1687991685}
team1Grid: {fileID: 105983837}
team0Economy: {fileID: 1687991687}
team1Economy: {fileID: 105983836}
playerCount: 2
--- !u!4 &1418310698
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1418310696}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -68.88014, y: 0.5, z: -0.41516}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1432930633 --- !u!1 &1432930633
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -568,6 +796,57 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 1401811864} m_Father: {fileID: 1401811864}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1460528676
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1460528678}
- component: {fileID: 1460528677}
m_Layer: 0
m_Name: SkirmishBootstrap
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1460528677
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1460528676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 55a4d60b2bf8ed14893e1569403c209a, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Skirmish.SkirmishBootstrap
unitTypes:
- {fileID: 11400000, guid: 3086cd18cc645174296981d67778f969, type: 2}
- {fileID: 11400000, guid: a1c5636849772f34e92425663d2dbc9c, type: 2}
wallTag: Wall
spawnHeight: 2
spawnSpreadX: 8
debugWaveCountPerTeam: 20
--- !u!4 &1460528678
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1460528676}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1465384989 --- !u!1 &1465384989
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -680,6 +959,68 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 1401811864} m_Father: {fileID: 1401811864}
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!1 &1687991684
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1687991686}
- component: {fileID: 1687991685}
- component: {fileID: 1687991687}
m_Layer: 0
m_Name: Team1_Base
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1687991685
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1687991684}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2d4e074c26982c4c8752ff97c4654ed, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.BaseGrid
columns: 10
rows: 10
cellSize: 2
--- !u!4 &1687991686
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1687991684}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -110, y: 2, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1687991687
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1687991684}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b97066bf235990144b39e9bc214b1cca, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.PlayerEconomy
startingGold: 100
incomePerWave: 50
--- !u!1 &1929976483 --- !u!1 &1929976483
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -731,6 +1072,77 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1932593963
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1932593966}
- component: {fileID: 1932593965}
- component: {fileID: 1932593964}
m_Layer: 0
m_Name: Team1_Shop
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1932593964
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932593963}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f49cec0c77e4fce4694ff6f19a72eea8, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.PlacementController
baseGrid: {fileID: 1687991685}
economy: {fileID: 1687991687}
shopUI: {fileID: 1932593965}
shopUnits:
- {fileID: 11400000, guid: 3086cd18cc645174296981d67778f969, type: 2}
- {fileID: 11400000, guid: a1c5636849772f34e92425663d2dbc9c, type: 2}
targetCamera: {fileID: 0}
--- !u!114 &1932593965
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932593963}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: acaf0cdd984399e44b7cb2114276e4c1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::HappyForest.Base.ShopUI
economy: {fileID: 1687991687}
placementController: {fileID: 1932593964}
shopUnits:
- {fileID: 11400000, guid: 3086cd18cc645174296981d67778f969, type: 2}
- {fileID: 11400000, guid: a1c5636849772f34e92425663d2dbc9c, type: 2}
teamLabel: Team A
barRow: 0
--- !u!4 &1932593966
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932593963}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -105.85, y: 0.5, z: -22.32}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2016336478 --- !u!1 &2016336478
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -963,3 +1375,9 @@ SceneRoots:
- {fileID: 925142574} - {fileID: 925142574}
- {fileID: 1401811864} - {fileID: 1401811864}
- {fileID: 1929976485} - {fileID: 1929976485}
- {fileID: 1460528678}
- {fileID: 1687991686}
- {fileID: 105983838}
- {fileID: 1932593966}
- {fileID: 190020083}
- {fileID: 1418310698}

View file

@ -1,88 +0,0 @@
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using Unity.Transforms;
namespace HappyForest.Prototypen
{
// Pille-gegen-Pille Kollision. Bewusst als einfacher O(n^2) Burst-Job gebaut,
// damit man per "K"-Taste sauber A/B vergleichen kann, was die Kollisionsprüfung
// an Performance kostet. Läuft nur, wenn PilleCollisionEnabled = true ist.
// (Für sehr große Mengen, z.B. >10.000, wäre ein Spatial-Grid der nächste Schritt.)
public partial struct PilleCollisionSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<PilleSimulationConfig>();
}
public void OnUpdate(ref SystemState state)
{
var config = SystemAPI.GetSingleton<PilleSimulationConfig>();
if (!config.PilleCollisionEnabled)
return;
var query = SystemAPI.QueryBuilder().WithAll<PilleComponent, LocalTransform>().Build();
int count = query.CalculateEntityCount();
if (count < 2)
return;
var transforms = query.ToComponentDataArray<LocalTransform>(Allocator.TempJob);
var pilles = query.ToComponentDataArray<PilleComponent>(Allocator.TempJob);
float radiusSum = config.PilleRadius * 2f;
var job = new ResolvePairCollisionsJob
{
Transforms = transforms,
Pilles = pilles,
RadiusSq = radiusSum * radiusSum
};
state.Dependency = job.Schedule(state.Dependency);
state.Dependency.Complete();
query.CopyFromComponentDataArray(pilles);
transforms.Dispose();
pilles.Dispose();
}
}
[BurstCompile]
public struct ResolvePairCollisionsJob : IJob
{
[ReadOnly] public NativeArray<LocalTransform> Transforms;
public NativeArray<PilleComponent> Pilles;
public float RadiusSq;
public void Execute()
{
int count = Transforms.Length;
for (int i = 0; i < count; i++)
{
for (int j = i + 1; j < count; j++)
{
float3 delta = Transforms[i].Position - Transforms[j].Position;
float distSq = math.lengthsq(delta);
if (distSq < RadiusSq && distSq > 0.0001f)
{
float3 normal = math.normalize(delta);
var pi = Pilles[i];
var pj = Pilles[j];
pi.Velocity = math.reflect(pi.Velocity, normal);
pj.Velocity = math.reflect(pj.Velocity, -normal);
Pilles[i] = pi;
Pilles[j] = pj;
}
}
}
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: c5c8d21e0eed6a948a3d402044a4dc1d

View file

@ -1,11 +0,0 @@
using Unity.Entities;
using Unity.Mathematics;
namespace HappyForest.Prototypen
{
public struct PilleComponent : IComponentData
{
public float3 Velocity;
public float Speed;
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: a7873b1a55b648b4491f56c9d66ad2e6

View file

@ -1,238 +0,0 @@
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
using Unity.Transforms;
using UnityEngine;
using UnityEngine.Rendering;
namespace HappyForest.Prototypen
{
// Einziges MonoBehaviour im DOTS-Setup. Aufgabe: Input lesen (Space/M/C/K),
// die Entity-World initialisieren und Pillen-Entities spawnen/löschen.
// Bewegung + Kollision laufen komplett in ISystem/Burst (siehe PilleMovementSystem
// und PilleCollisionSystem) - hier passiert keine Simulationslogik mehr.
public class PilleDotsBootstrap : MonoBehaviour
{
[Header("Rendering (Pflichtfelder)")]
[SerializeField] private Mesh pilleMesh;
[SerializeField] private Material pilleMaterial;
[Header("Einstellungen")]
[SerializeField] private float speed = 5f;
[SerializeField] private float pilleRadius = 0.5f;
[SerializeField] private float spawnHeight = 1f;
[SerializeField] private string wallTag = "Wall";
[SerializeField] private float actionDelay = 0.05f;
private EntityManager entityManager;
private Entity pilleTemplateEntity;
private EntityQuery pilleQuery;
private EntityQuery configQuery;
private int pilleCount = 0;
private float lastActionTime = 0f;
private bool collisionEnabledCache = false;
private Texture2D backgroundTexture;
void Start()
{
if (pilleMesh == null || pilleMaterial == null)
{
Debug.LogError("❌ PilleDotsBootstrap: Mesh oder Material im Inspector zuweisen!");
enabled = false;
return;
}
entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
SetupSimulationConfig();
SetupPilleTemplate();
pilleQuery = entityManager.CreateEntityQuery(typeof(PilleComponent), typeof(LocalTransform));
configQuery = entityManager.CreateEntityQuery(typeof(PilleSimulationConfig));
backgroundTexture = MakeTex(new Color(0f, 0f, 0f, 0.65f));
Debug.Log("✅ PilleDotsBootstrap bereit! Space=Spawn M=Delete C=Spawn100 K=Kollision Toggle");
}
void SetupSimulationConfig()
{
var wallBounds = ComputeWallBounds();
float margin = pilleRadius + 0.1f;
var configEntity = entityManager.CreateEntity(typeof(PilleSimulationConfig));
entityManager.SetComponentData(configEntity, new PilleSimulationConfig
{
BoundsMin = new float3(wallBounds.min.x + margin, spawnHeight, wallBounds.min.z + margin),
BoundsMax = new float3(wallBounds.max.x - margin, spawnHeight, wallBounds.max.z - margin),
PlayHeight = spawnHeight,
PilleRadius = pilleRadius,
PilleCollisionEnabled = false
});
}
Bounds ComputeWallBounds()
{
var walls = GameObject.FindGameObjectsWithTag(wallTag);
if (walls.Length == 0)
{
Debug.LogWarning($"⚠️ Keine GameObjects mit Tag '{wallTag}' gefunden. Nutze Standard-Grenzen (50x100).");
return new Bounds(Vector3.zero, new Vector3(50, 10, 100));
}
Bounds combined = default;
bool first = true;
foreach (var wall in walls)
{
var rend = wall.GetComponent<Renderer>();
if (rend == null) continue;
if (first) { combined = rend.bounds; first = false; }
else combined.Encapsulate(rend.bounds);
}
Debug.Log($"✅ Feld-Grenzen aus '{wallTag}'-Objekten berechnet: Min={combined.min} Max={combined.max}");
return combined;
}
void SetupPilleTemplate()
{
pilleTemplateEntity = entityManager.CreateEntity(
typeof(PilleComponent),
typeof(LocalTransform),
typeof(LocalToWorld));
var desc = new RenderMeshDescription(ShadowCastingMode.On, receiveShadows: true);
var renderMeshArray = new RenderMeshArray(new[] { pilleMaterial }, new[] { pilleMesh });
RenderMeshUtility.AddComponents(
pilleTemplateEntity,
entityManager,
desc,
renderMeshArray,
MaterialMeshInfo.FromRenderMeshArrayIndices(0, 0));
entityManager.SetComponentData(pilleTemplateEntity,
LocalTransform.FromPosition(new float3(0, spawnHeight, 0)));
entityManager.SetComponentData(pilleTemplateEntity, new PilleComponent
{
Velocity = new float3(1, 0, 0),
Speed = speed
});
// WICHTIG: Prefab-Tag, damit dieses Template NICHT von den Queries/Systemen
// (Bewegung, Kollision, Zählung) erfasst wird. Instantiate() entfernt den Tag
// automatisch bei jeder Kopie.
entityManager.AddComponent<Prefab>(pilleTemplateEntity);
}
void Update()
{
if (Input.GetKeyDown(KeyCode.K))
{
ToggleCollision();
}
if (Time.time - lastActionTime < actionDelay)
return;
if (Input.GetKey(KeyCode.Space))
{
SpawnPille();
lastActionTime = Time.time;
}
else if (Input.GetKey(KeyCode.M))
{
DeletePille();
lastActionTime = Time.time;
}
else if (Input.GetKey(KeyCode.C))
{
for (int i = 0; i < 100; i++)
SpawnPille();
lastActionTime = Time.time;
}
}
void SpawnPille()
{
float3 spawnPos = new float3(0, spawnHeight, 0);
int existing = pilleQuery.CalculateEntityCount();
if (existing > 0)
{
var transforms = pilleQuery.ToComponentDataArray<LocalTransform>(Allocator.Temp);
int idx = UnityEngine.Random.Range(0, transforms.Length);
spawnPos = transforms[idx].Position;
transforms.Dispose();
}
Entity newPille = entityManager.Instantiate(pilleTemplateEntity);
float angle = UnityEngine.Random.Range(0f, math.PI * 2f);
var velocity = new float3(math.cos(angle), 0, math.sin(angle));
entityManager.SetComponentData(newPille, LocalTransform.FromPosition(spawnPos));
entityManager.SetComponentData(newPille, new PilleComponent
{
Velocity = velocity,
Speed = speed
});
pilleCount++;
}
void DeletePille()
{
if (pilleQuery.CalculateEntityCount() == 0)
return;
var entities = pilleQuery.ToEntityArray(Allocator.Temp);
entityManager.DestroyEntity(entities[0]);
entities.Dispose();
pilleCount--;
}
void ToggleCollision()
{
if (configQuery.CalculateEntityCount() == 0)
return;
var configEntity = configQuery.GetSingletonEntity();
var cfg = entityManager.GetComponentData<PilleSimulationConfig>(configEntity);
cfg.PilleCollisionEnabled = !cfg.PilleCollisionEnabled;
entityManager.SetComponentData(configEntity, cfg);
collisionEnabledCache = cfg.PilleCollisionEnabled;
}
Texture2D MakeTex(Color color)
{
var tex = new Texture2D(1, 1);
tex.SetPixel(0, 0, color);
tex.Apply();
return tex;
}
void OnGUI()
{
GUI.DrawTexture(new Rect(5, 5, 430, 90), backgroundTexture);
GUI.color = Color.white;
GUI.skin.label.fontSize = 18;
GUI.Label(new Rect(15, 10, 410, 25), $"Pillen: {pilleCount} | FPS: {(int)(1f / Time.deltaTime)}");
GUI.Label(new Rect(15, 35, 410, 25), $"Pille-Kollision (K): {(collisionEnabledCache ? "AN" : "AUS")}");
GUI.Label(new Rect(15, 60, 410, 25), "Space=Spawn M=Delete C=Spawn100 K=Kollision Toggle");
}
void OnDestroy()
{
if (backgroundTexture != null)
Destroy(backgroundTexture);
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: f717f54a39e0fec47bd6fe47f1e643e2

View file

@ -1,38 +0,0 @@
using UnityEngine;
namespace HappyForest.Prototypen
{
public class PilleGameObjectMover : MonoBehaviour
{
public Vector3 velocity = Vector3.right;
private float speed = 5f;
private float raycastDistance = 0.8f;
void FixedUpdate()
{
if (velocity.magnitude == 0)
velocity = Vector3.right;
// Raycast nur gegen Wände checken
RaycastHit hit;
if (Physics.Raycast(transform.position, velocity.normalized, out hit, raycastDistance))
{
if (hit.collider.CompareTag("Wall"))
{
velocity = Vector3.Reflect(velocity, hit.normal);
}
}
// Bewegung
transform.position += velocity.normalized * speed * Time.fixedDeltaTime;
}
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Wall"))
{
velocity = Vector3.Reflect(velocity, collision.relativeVelocity.normalized);
}
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: f4aadfba2e345d34a9ec0d542a2149d4

View file

@ -1,67 +0,0 @@
using Unity.Burst;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
namespace HappyForest.Prototypen
{
// Bewegt alle Pillen und lässt sie an den (aus den "Wall"-Objekten berechneten)
// Feld-Grenzen abprallen. Läuft komplett als Burst-kompilierter Parallel-Job.
[BurstCompile]
public partial struct PilleMovementSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<PilleSimulationConfig>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var config = SystemAPI.GetSingleton<PilleSimulationConfig>();
float deltaTime = SystemAPI.Time.DeltaTime;
var job = new MoveAndBounceJob
{
DeltaTime = deltaTime,
BoundsMin = config.BoundsMin,
BoundsMax = config.BoundsMax,
PlayHeight = config.PlayHeight
};
state.Dependency = job.ScheduleParallel(state.Dependency);
}
}
[BurstCompile]
public partial struct MoveAndBounceJob : IJobEntity
{
public float DeltaTime;
public float3 BoundsMin;
public float3 BoundsMax;
public float PlayHeight;
void Execute(ref LocalTransform transform, ref PilleComponent pille)
{
if (math.lengthsq(pille.Velocity) < 0.0001f)
pille.Velocity = new float3(1f, 0f, 0f);
float3 pos = transform.Position + pille.Velocity * pille.Speed * DeltaTime;
if (pos.x < BoundsMin.x || pos.x > BoundsMax.x)
{
pille.Velocity.x *= -1f;
pos.x = math.clamp(pos.x, BoundsMin.x, BoundsMax.x);
}
if (pos.z < BoundsMin.z || pos.z > BoundsMax.z)
{
pille.Velocity.z *= -1f;
pos.z = math.clamp(pos.z, BoundsMin.z, BoundsMax.z);
}
pos.y = PlayHeight;
transform.Position = pos;
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 0d9cc3dffbc29c541932aa573ad049ab

View file

@ -1,16 +0,0 @@
using Unity.Entities;
using Unity.Mathematics;
namespace HappyForest.Prototypen
{
// Singleton-Komponente: Wird einmal beim Start von PilleDotsBootstrap erzeugt
// und steuert das Verhalten aller Systeme (Grenzen, Kollisions-Toggle etc.).
public struct PilleSimulationConfig : IComponentData
{
public float3 BoundsMin;
public float3 BoundsMax;
public float PlayHeight;
public float PilleRadius;
public bool PilleCollisionEnabled;
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 0a8bb1e30bb47a34abb9537815159639

View file

@ -1,111 +0,0 @@
using System.Collections;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
namespace HappyForest.Prototypen
{
public class PilleSpawnerWithPrefab : MonoBehaviour
{
[SerializeField] private GameObject pillePrefab;
private int pilleCount = 0;
private float lastSpawnTime = 0f;
private float spawnDelay = 0.05f;
private Transform pilleContainer;
void Start()
{
if (pillePrefab == null)
{
Debug.LogError("❌ Pille Prefab nicht zugewiesen!");
return;
}
pilleContainer = new GameObject("PilleInstances").transform;
}
void Update()
{
if (Time.time - lastSpawnTime < spawnDelay)
return;
if (Input.GetKey(KeyCode.Space))
{
SpawnPille();
lastSpawnTime = Time.time;
}
if (Input.GetKey(KeyCode.M))
{
DeleteRandomPille();
lastSpawnTime = Time.time;
}
if (Input.GetKey(KeyCode.C))
{
// Spawn 100 Pillen mit Delay, jede bei einer anderen Pille
StartCoroutine(SpawnMultiplePillen(100));
lastSpawnTime = Time.time;
}
}
void SpawnPille()
{
if (pillePrefab == null)
return;
// Zufällige horizontale Richtung
var random = new Unity.Mathematics.Random((uint)System.Guid.NewGuid().GetHashCode());
float angle = random.NextFloat() * math.PI * 2;
var velocity = new Vector3(math.cos(angle), 0, math.sin(angle));
// Spawn-Position: Bei einer existierenden Pille oder Default
Vector3 spawnPos = new Vector3(0, 5, 0);
if (pilleContainer.childCount > 0)
{
// Wähle zufällige existierende Pille
int randomIndex = UnityEngine.Random.Range(0, pilleContainer.childCount);
Transform randomPille = pilleContainer.GetChild(randomIndex);
spawnPos = randomPille.position;
}
// Instantiiere Prefab
var pilleGO = Instantiate(pillePrefab, pilleContainer);
pilleGO.name = $"Pille_{pilleCount}";
pilleGO.transform.position = spawnPos;
// Füge MovementScript hinzu
var mover = pilleGO.AddComponent<PilleGameObjectMover>();
mover.velocity = velocity.normalized * 5f;
pilleCount++;
}
void DeleteRandomPille()
{
if (pilleContainer.childCount > 0)
{
Destroy(pilleContainer.GetChild(0).gameObject);
pilleCount--;
}
}
IEnumerator SpawnMultiplePillen(int count)
{
for (int i = 0; i < count; i++)
{
SpawnPille();
yield return new WaitForSeconds(0.01f);
}
}
void OnGUI()
{
GUI.color = Color.yellow;
GUI.skin.label.fontSize = 20;
GUI.Label(new Rect(10, 10, 400, 30), $"Pillen: {pilleCount} | FPS: {(int)(1f / Time.deltaTime)}");
GUI.Label(new Rect(10, 50, 400, 30), "Space=Spawn | M=Delete | C=Spawn100");
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 4d1c6532ed3464c49a3edc67997d2cb8

2353
Docs/CodeDokumentation.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
<Solution> <Solution>
<Project Path="Assembly-CSharp-Editor.csproj" />
<Project Path="Assembly-CSharp.csproj" /> <Project Path="Assembly-CSharp.csproj" />
<Project Path="Assembly-CSharp-Editor.csproj" />
</Solution> </Solution>

View file

@ -5,6 +5,7 @@
"com.unity.ide.visualstudio": "2.0.27", "com.unity.ide.visualstudio": "2.0.27",
"com.unity.inputsystem": "1.20.0", "com.unity.inputsystem": "1.20.0",
"com.unity.multiplayer.center": "1.0.1", "com.unity.multiplayer.center": "1.0.1",
"com.unity.physics": "1.4.7",
"com.unity.render-pipelines.universal": "17.3.0", "com.unity.render-pipelines.universal": "17.3.0",
"com.unity.shadergraph": "17.3.0", "com.unity.shadergraph": "17.3.0",
"com.unity.modules.accessibility": "1.0.0", "com.unity.modules.accessibility": "1.0.0",

View file

@ -102,6 +102,21 @@
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.com" "url": "https://packages.unity.com"
}, },
"com.unity.physics": {
"version": "1.4.7",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.29",
"com.unity.entities": "1.4.8",
"com.unity.collections": "2.6.8",
"com.unity.mathematics": "1.3.2",
"com.unity.modules.imgui": "1.0.0",
"com.unity.test-framework": "1.4.6",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.profiling.core": { "com.unity.profiling.core": {
"version": "1.0.3", "version": "1.0.3",
"depth": 1, "depth": 1,