Gewehr sollte jetzt vollständig Funktionieren mitsamt Schusseffekten und Bugfixing. Es fehlen noch anpassungen an Balancingwerten. Als nächstes sollte Gegner Hit-Registrierung und Combat dessen Seite anstehen, dann weitere Türme zur Verteidigung.
This commit is contained in:
1 parent
e8c81646c4
commit
9367275e8d
17 files changed
+591
-418
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 46767ba1343638e43b6fc7d2ff117ba3
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!74 &7400000
|
||||||
|
AnimationClip:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Effect_Gewehr
|
||||||
|
serializedVersion: 7
|
||||||
|
m_Legacy: 0
|
||||||
|
m_Compressed: 0
|
||||||
|
m_UseHighQualityCurve: 1
|
||||||
|
m_RotationCurves: []
|
||||||
|
m_CompressedRotationCurves: []
|
||||||
|
m_EulerCurves: []
|
||||||
|
m_PositionCurves: []
|
||||||
|
m_ScaleCurves: []
|
||||||
|
m_FloatCurves: []
|
||||||
|
m_PPtrCurves:
|
||||||
|
- serializedVersion: 2
|
||||||
|
curve:
|
||||||
|
- time: 0
|
||||||
|
value: {fileID: -6303976665709429909, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- time: 0.0625
|
||||||
|
value: {fileID: -8843309449222028242, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- time: 0.125
|
||||||
|
value: {fileID: 8722966013052872789, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- time: 0.1875
|
||||||
|
value: {fileID: -1546728375909237763, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
attribute: m_Sprite
|
||||||
|
path:
|
||||||
|
classID: 212
|
||||||
|
script: {fileID: 0}
|
||||||
|
flags: 2
|
||||||
|
m_SampleRate: 16
|
||||||
|
m_WrapMode: 0
|
||||||
|
m_Bounds:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
|
m_ClipBindingConstant:
|
||||||
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 0
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 212
|
||||||
|
customType: 23
|
||||||
|
isPPtrCurve: 1
|
||||||
|
isIntCurve: 0
|
||||||
|
isSerializeReferenceCurve: 0
|
||||||
|
pptrCurveMapping:
|
||||||
|
- {fileID: -6303976665709429909, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- {fileID: -8843309449222028242, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- {fileID: 8722966013052872789, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
- {fileID: -1546728375909237763, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
m_AnimationClipSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
|
m_AdditiveReferencePoseTime: 0
|
||||||
|
m_StartTime: 0
|
||||||
|
m_StopTime: 0.25
|
||||||
|
m_OrientationOffsetY: 0
|
||||||
|
m_Level: 0
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_HasAdditiveReferencePose: 0
|
||||||
|
m_LoopTime: 0
|
||||||
|
m_LoopBlend: 0
|
||||||
|
m_LoopBlendOrientation: 0
|
||||||
|
m_LoopBlendPositionY: 0
|
||||||
|
m_LoopBlendPositionXZ: 0
|
||||||
|
m_KeepOriginalOrientation: 0
|
||||||
|
m_KeepOriginalPositionY: 1
|
||||||
|
m_KeepOriginalPositionXZ: 0
|
||||||
|
m_HeightFromFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_EditorCurves: []
|
||||||
|
m_EulerEditorCurves: []
|
||||||
|
m_HasGenericRootTransform: 0
|
||||||
|
m_HasMotionFloatCurves: 0
|
||||||
|
m_Events: []
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ada427b26f94fb442926838e9e096c79
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1107 &-2273318640650671041
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 6612646465793690711}
|
||||||
|
m_Position: {x: 200, y: 0, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 6612646465793690711}
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Effect_Gewehr_Controller
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters: []
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: -2273318640650671041}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!1102 &6612646465793690711
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Effect_Gewehr
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 7400000, guid: ada427b26f94fb442926838e9e096c79, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f917cf31a0ac3834ab59465a1fe8c002
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 9100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -168,60 +168,16 @@ TextureImporter:
|
|||||||
spriteSheet:
|
spriteSheet:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
sprites:
|
sprites:
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_0
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 118
|
|
||||||
y: 2731
|
|
||||||
width: 365
|
|
||||||
height: 189
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 0a730d5ed7747dc00800000000000000
|
|
||||||
internalID: 925286854500038560
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_1
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 497
|
|
||||||
y: 2716
|
|
||||||
width: 301
|
|
||||||
height: 128
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 90b5464ba9b1a3210800000000000000
|
|
||||||
internalID: 1313392592597310217
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_2
|
name: Rauch_2
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1439
|
x: 1439
|
||||||
y: 2267
|
y: 2267
|
||||||
width: 324
|
width: 376
|
||||||
height: 560
|
height: 560
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -234,38 +190,16 @@ TextureImporter:
|
|||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_3
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 2353
|
|
||||||
y: 2582
|
|
||||||
width: 156
|
|
||||||
height: 334
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 8d88595c7577213d0800000000000000
|
|
||||||
internalID: -3237393963265193768
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_4
|
name: Rauch_4
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 238
|
x: 214
|
||||||
y: 2286
|
y: 2286
|
||||||
width: 225
|
width: 249
|
||||||
height: 277
|
height: 277
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -286,8 +220,8 @@ TextureImporter:
|
|||||||
y: 2286
|
y: 2286
|
||||||
width: 393
|
width: 393
|
||||||
height: 444
|
height: 444
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -304,12 +238,12 @@ TextureImporter:
|
|||||||
name: Rauch_6
|
name: Rauch_6
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 2381
|
x: 2344
|
||||||
y: 2287
|
y: 2287
|
||||||
width: 179
|
width: 216
|
||||||
height: 279
|
height: 662
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -322,82 +256,16 @@ TextureImporter:
|
|||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_7
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 71
|
|
||||||
y: 1905
|
|
||||||
width: 235
|
|
||||||
height: 241
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 74dcbfb31d139cb60800000000000000
|
|
||||||
internalID: 7766793807101414727
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_8
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 348
|
|
||||||
y: 2110
|
|
||||||
width: 7
|
|
||||||
height: 6
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: b5e23df6014a5f3d0800000000000000
|
|
||||||
internalID: -3173449971910103461
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_9
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 426
|
|
||||||
y: 1985
|
|
||||||
width: 273
|
|
||||||
height: 146
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: d4ec2cf62686602d0800000000000000
|
|
||||||
internalID: -3312845703893299635
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_10
|
name: Rauch_10
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 2301
|
x: 2301
|
||||||
y: 1531
|
y: 1531
|
||||||
width: 233
|
width: 284
|
||||||
height: 718
|
height: 718
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -410,50 +278,6 @@ TextureImporter:
|
|||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_11
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 318
|
|
||||||
y: 1973
|
|
||||||
width: 28
|
|
||||||
height: 114
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: b8a10c6bf6f191690800000000000000
|
|
||||||
internalID: -7631033528934720885
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_12
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 349
|
|
||||||
y: 1899
|
|
||||||
width: 91
|
|
||||||
height: 202
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 155c76b61cc3a63f0800000000000000
|
|
||||||
internalID: -906845573533416111
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_13
|
name: Rauch_13
|
||||||
rect:
|
rect:
|
||||||
@@ -462,8 +286,8 @@ TextureImporter:
|
|||||||
y: 1473
|
y: 1473
|
||||||
width: 541
|
width: 541
|
||||||
height: 618
|
height: 618
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -484,8 +308,8 @@ TextureImporter:
|
|||||||
y: 1472
|
y: 1472
|
||||||
width: 273
|
width: 273
|
||||||
height: 243
|
height: 243
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -504,10 +328,10 @@ TextureImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 902
|
x: 902
|
||||||
y: 1463
|
y: 1463
|
||||||
width: 323
|
width: 362
|
||||||
height: 453
|
height: 453
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -520,50 +344,6 @@ TextureImporter:
|
|||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_16
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 0
|
|
||||||
y: 1097
|
|
||||||
width: 225
|
|
||||||
height: 269
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 8b5d3bf0d683a8b60800000000000000
|
|
||||||
internalID: 7749068149910394296
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_17
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 353
|
|
||||||
y: 1308
|
|
||||||
width: 11
|
|
||||||
height: 11
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: 965ff54bbab100410800000000000000
|
|
||||||
internalID: 1441182305038103913
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_18
|
name: Rauch_18
|
||||||
rect:
|
rect:
|
||||||
@@ -572,8 +352,8 @@ TextureImporter:
|
|||||||
y: 622
|
y: 622
|
||||||
width: 237
|
width: 237
|
||||||
height: 731
|
height: 731
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -586,60 +366,16 @@ TextureImporter:
|
|||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_19
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 232
|
|
||||||
y: 1139
|
|
||||||
width: 114
|
|
||||||
height: 152
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: b9db3e6d40923a3a0800000000000000
|
|
||||||
internalID: -6655430723561603685
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
|
||||||
name: Rauch_20
|
|
||||||
rect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 376
|
|
||||||
y: 1022
|
|
||||||
width: 482
|
|
||||||
height: 234
|
|
||||||
alignment: 0
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
customData:
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
tessellationDetail: -1
|
|
||||||
bones: []
|
|
||||||
spriteID: aa77aac4ca74cf7f0800000000000000
|
|
||||||
internalID: -577507846864078934
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: Rauch_21
|
name: Rauch_21
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 143
|
x: 134
|
||||||
y: 625
|
y: 625
|
||||||
width: 370
|
width: 379
|
||||||
height: 271
|
height: 271
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -658,10 +394,10 @@ TextureImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 932
|
x: 932
|
||||||
y: 619
|
y: 619
|
||||||
width: 453
|
width: 483
|
||||||
height: 465
|
height: 465
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -680,10 +416,10 @@ TextureImporter:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1677
|
x: 1677
|
||||||
y: 610
|
y: 610
|
||||||
width: 269
|
width: 287
|
||||||
height: 483
|
height: 483
|
||||||
alignment: 0
|
alignment: 7
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0.5, y: 0}
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
customData:
|
customData:
|
||||||
outline: []
|
outline: []
|
||||||
@@ -700,7 +436,7 @@ TextureImporter:
|
|||||||
customData:
|
customData:
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID:
|
spriteID: f8b5067244adc774fa21b81b4b438edb
|
||||||
internalID: 0
|
internalID: 0
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,130 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1313718138720253764
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4027074334762538559}
|
||||||
|
- component: {fileID: 3419084617669646245}
|
||||||
|
- component: {fileID: 1344614642215470944}
|
||||||
|
- component: {fileID: 3059169406855380490}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Effect_Gewehr
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4027074334762538559
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1313718138720253764}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
|
m_LocalScale: {x: 0.2, y: 0.2, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &3419084617669646245
|
||||||
|
SpriteRenderer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1313718138720253764}
|
||||||
|
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_Sprite: {fileID: -6303976665709429909, guid: 7e09b625b23e8c2468a7f7b89e5b738c, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 2.49, y: 2.7700002}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!95 &1344614642215470944
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 7
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1313718138720253764}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: f917cf31a0ac3834ab59465a1fe8c002, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_StabilizeFeet: 0
|
||||||
|
m_AnimatePhysics: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorStateOnDisable: 0
|
||||||
|
m_WriteDefaultValuesOnDisable: 0
|
||||||
|
--- !u!114 &3059169406855380490
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1313718138720253764}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f940cc0e7651f6546bf6a13498d1b9db, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::DestroyAfterAnimation
|
||||||
|
animator: {fileID: 1344614642215470944}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3469682e579d69c45ba516efa100bc7b
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -207,7 +207,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 3403994134791511056}
|
m_GameObject: {fileID: 3403994134791511056}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0.705, z: 0}
|
m_LocalPosition: {x: 0, y: 0.705, z: -3}
|
||||||
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: []
|
||||||
@@ -265,6 +265,8 @@ MonoBehaviour:
|
|||||||
rotationSpeed: 360
|
rotationSpeed: 360
|
||||||
bulletPrefab: {fileID: 7426253257777804155, guid: 74c8fe00b6f25fe4d982242b4a6a8a52, type: 3}
|
bulletPrefab: {fileID: 7426253257777804155, guid: 74c8fe00b6f25fe4d982242b4a6a8a52, type: 3}
|
||||||
bulletSpeed: 8
|
bulletSpeed: 8
|
||||||
|
pierce: 3
|
||||||
|
effectPrefab: {fileID: 1313718138720253764, guid: 3469682e579d69c45ba516efa100bc7b, type: 3}
|
||||||
--- !u!1 &8054465148716892994
|
--- !u!1 &8054465148716892994
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -9336,97 +9336,6 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 280749995}
|
m_GameObject: {fileID: 280749995}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &284050133
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 284050135}
|
|
||||||
- component: {fileID: 284050134}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: BackgroundOuterwallCircleTest
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!212 &284050134
|
|
||||||
SpriteRenderer:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 284050133}
|
|
||||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
|
||||||
m_RayTracingAccelStructBuildFlags: 1
|
|
||||||
m_SmallMeshCulling: 1
|
|
||||||
m_ForceMeshLod: -1
|
|
||||||
m_MeshLodSelectionBias: 0
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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_GlobalIlluminationMeshLod: 0
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3}
|
|
||||||
m_Color: {r: 0.4056604, g: 0.4056604, b: 0.4056604, 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_SpriteSortPoint: 0
|
|
||||||
--- !u!4 &284050135
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 284050133}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 20}
|
|
||||||
m_LocalScale: {x: 8, y: 8, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 328858397}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &290219945
|
--- !u!1 &290219945
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -11214,7 +11123,6 @@ Transform:
|
|||||||
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:
|
||||||
- {fileID: 284050135}
|
|
||||||
- {fileID: 1960833421}
|
- {fileID: 1960833421}
|
||||||
- {fileID: 1079372398}
|
- {fileID: 1079372398}
|
||||||
- {fileID: 1723151782}
|
- {fileID: 1723151782}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -15,18 +16,26 @@ public class Bullet : MonoBehaviour
|
|||||||
private float distanceTravelled;
|
private float distanceTravelled;
|
||||||
|
|
||||||
private bool initialized;
|
private bool initialized;
|
||||||
|
private bool consumed;
|
||||||
|
|
||||||
// Speichert alle Gegner, die diese Kugel bereits getroffen hat.
|
[Header("Pierce")]
|
||||||
private HashSet<Enemy> hitEnemies = new HashSet<Enemy>();
|
private int remainingPierce;
|
||||||
|
|
||||||
|
// Trefferliste wird vom Turret übergeben.
|
||||||
|
// Sie gilt für den gesamten Angriff.
|
||||||
|
private HashSet<Enemy> hitEnemies;
|
||||||
|
|
||||||
private Rigidbody2D rb;
|
private Rigidbody2D rb;
|
||||||
|
private Collider2D bulletCollider;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
rb = GetComponent<Rigidbody2D>();
|
rb = GetComponent<Rigidbody2D>();
|
||||||
|
bulletCollider = GetComponent<Collider2D>();
|
||||||
|
|
||||||
rb.gravityScale = 0f;
|
rb.gravityScale = 0f;
|
||||||
rb.bodyType = RigidbodyType2D.Kinematic;
|
rb.bodyType = RigidbodyType2D.Kinematic;
|
||||||
|
|
||||||
rb.collisionDetectionMode =
|
rb.collisionDetectionMode =
|
||||||
CollisionDetectionMode2D.Continuous;
|
CollisionDetectionMode2D.Continuous;
|
||||||
}
|
}
|
||||||
@@ -35,7 +44,9 @@ public class Bullet : MonoBehaviour
|
|||||||
Vector2 shootDirection,
|
Vector2 shootDirection,
|
||||||
float bulletSpeed,
|
float bulletSpeed,
|
||||||
float bulletDamage,
|
float bulletDamage,
|
||||||
float range
|
float range,
|
||||||
|
int pierce,
|
||||||
|
HashSet<Enemy> sharedHitEnemies
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
direction = shootDirection.normalized;
|
direction = shootDirection.normalized;
|
||||||
@@ -44,7 +55,17 @@ public class Bullet : MonoBehaviour
|
|||||||
damage = bulletDamage;
|
damage = bulletDamage;
|
||||||
maxDistance = range;
|
maxDistance = range;
|
||||||
|
|
||||||
// Sprite zeigt standardmäßig mit seiner lokalen Y-Achse nach oben.
|
remainingPierce = Mathf.Max(1, pierce);
|
||||||
|
|
||||||
|
// Dieselbe Trefferliste wie in Phase 1 verwenden.
|
||||||
|
hitEnemies = sharedHitEnemies
|
||||||
|
?? new HashSet<Enemy>();
|
||||||
|
|
||||||
|
distanceTravelled = 0f;
|
||||||
|
|
||||||
|
consumed = false;
|
||||||
|
initialized = true;
|
||||||
|
|
||||||
float angle =
|
float angle =
|
||||||
Mathf.Atan2(direction.y, direction.x)
|
Mathf.Atan2(direction.y, direction.x)
|
||||||
* Mathf.Rad2Deg - 90f;
|
* Mathf.Rad2Deg - 90f;
|
||||||
@@ -52,14 +73,19 @@ public class Bullet : MonoBehaviour
|
|||||||
transform.rotation =
|
transform.rotation =
|
||||||
Quaternion.Euler(0f, 0f, angle);
|
Quaternion.Euler(0f, 0f, angle);
|
||||||
|
|
||||||
initialized = true;
|
bulletCollider.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (!initialized || consumed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
MoveBullet();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MoveBullet()
|
||||||
|
{
|
||||||
float remainingDistance =
|
float remainingDistance =
|
||||||
maxDistance - distanceTravelled;
|
maxDistance - distanceTravelled;
|
||||||
|
|
||||||
@@ -89,20 +115,30 @@ public class Bullet : MonoBehaviour
|
|||||||
|
|
||||||
private void OnTriggerEnter2D(Collider2D other)
|
private void OnTriggerEnter2D(Collider2D other)
|
||||||
{
|
{
|
||||||
|
if (!initialized || consumed)
|
||||||
|
return;
|
||||||
|
|
||||||
Enemy enemy =
|
Enemy enemy =
|
||||||
other.GetComponentInParent<Enemy>();
|
other.GetComponentInParent<Enemy>();
|
||||||
|
|
||||||
if (enemy == null)
|
if (enemy == null || enemy.IsDead)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Bereits getroffenen Gegner ignorieren.
|
// Bereits in Phase 1 oder Phase 2 getroffen?
|
||||||
if (!hitEnemies.Add(enemy))
|
if (!hitEnemies.Add(enemy))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Keine weiteren Treffer auf tote Gegner.
|
|
||||||
if (enemy.IsDead)
|
|
||||||
return;
|
|
||||||
|
|
||||||
enemy.TakeDamage(damage);
|
enemy.TakeDamage(damage);
|
||||||
|
|
||||||
|
remainingPierce--;
|
||||||
|
|
||||||
|
if (remainingPierce <= 0)
|
||||||
|
{
|
||||||
|
consumed = true;
|
||||||
|
|
||||||
|
bulletCollider.enabled = false;
|
||||||
|
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class DestroyAfterAnimation : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private Animator animator;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
if (animator == null)
|
||||||
|
animator = GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (animator == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
AnimatorStateInfo state =
|
||||||
|
animator.GetCurrentAnimatorStateInfo(0);
|
||||||
|
|
||||||
|
if (state.normalizedTime >= 1f
|
||||||
|
&& !animator.IsInTransition(0))
|
||||||
|
{
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f940cc0e7651f6546bf6a13498d1b9db
|
||||||
+159
-12
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using DepthsOfGreed.HandbookUI;
|
using DepthsOfGreed.HandbookUI;
|
||||||
|
|
||||||
@@ -24,6 +26,13 @@ public class Turret : MonoBehaviour
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private float bulletSpeed = 8f;
|
private float bulletSpeed = 8f;
|
||||||
|
|
||||||
|
[Min(1)]
|
||||||
|
public int pierce = 3;
|
||||||
|
|
||||||
|
[Header("Shooting Effect")]
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject effectPrefab;
|
||||||
|
|
||||||
private CombatDefinition combatStats;
|
private CombatDefinition combatStats;
|
||||||
|
|
||||||
private float nextAttackTime;
|
private float nextAttackTime;
|
||||||
@@ -62,7 +71,6 @@ public class Turret : MonoBehaviour
|
|||||||
if (combatStats == null)
|
if (combatStats == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Ziel innerhalb der Reichweite suchen.
|
|
||||||
currentTarget = FindTarget();
|
currentTarget = FindTarget();
|
||||||
|
|
||||||
if (currentTarget != null)
|
if (currentTarget != null)
|
||||||
@@ -72,7 +80,6 @@ public class Turret : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Zur ursprünglichen Ausrichtung zurückkehren.
|
|
||||||
RotateTowardsOrigin();
|
RotateTowardsOrigin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +126,6 @@ public class Turret : MonoBehaviour
|
|||||||
Vector3 worldDirection =
|
Vector3 worldDirection =
|
||||||
currentTarget.transform.position - turret.position;
|
currentTarget.transform.position - turret.position;
|
||||||
|
|
||||||
// Richtung in den lokalen Raum der Turmbasis umwandeln.
|
|
||||||
Vector3 localDirection =
|
Vector3 localDirection =
|
||||||
turret.parent != null
|
turret.parent != null
|
||||||
? turret.parent.InverseTransformDirection(worldDirection)
|
? turret.parent.InverseTransformDirection(worldDirection)
|
||||||
@@ -166,6 +172,95 @@ public class Turret : MonoBehaviour
|
|||||||
|
|
||||||
private void Shoot()
|
private void Shoot()
|
||||||
{
|
{
|
||||||
|
// Feuer-Effekt an der Geschützspitze erzeugen.
|
||||||
|
if (effectPrefab != null)
|
||||||
|
{
|
||||||
|
Instantiate(
|
||||||
|
effectPrefab,
|
||||||
|
tip.position,
|
||||||
|
tip.rotation
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Neue Trefferliste für diesen Angriff.
|
||||||
|
HashSet<Enemy> hitEnemies = new HashSet<Enemy>();
|
||||||
|
|
||||||
|
int remainingPierce = Mathf.Max(1, pierce);
|
||||||
|
|
||||||
|
// Kreisradius entspricht dem Abstand zur Geschützspitze.
|
||||||
|
Vector2 attackCenter = turret.position;
|
||||||
|
|
||||||
|
float attackRadius = Vector2.Distance(
|
||||||
|
turret.position,
|
||||||
|
tip.position
|
||||||
|
);
|
||||||
|
|
||||||
|
// Alle Collider im Nahbereich ermitteln.
|
||||||
|
Collider2D[] nearbyColliders =
|
||||||
|
Physics2D.OverlapCircleAll(
|
||||||
|
attackCenter,
|
||||||
|
attackRadius
|
||||||
|
);
|
||||||
|
|
||||||
|
// Gegner und ihre Entfernung speichern.
|
||||||
|
Dictionary<Enemy, float> nearbyEnemies =
|
||||||
|
new Dictionary<Enemy, float>();
|
||||||
|
|
||||||
|
foreach (Collider2D col in nearbyColliders)
|
||||||
|
{
|
||||||
|
if (col == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Enemy enemy =
|
||||||
|
col.GetComponentInParent<Enemy>();
|
||||||
|
|
||||||
|
if (enemy == null || enemy.IsDead)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Mehrere Collider desselben Gegners vermeiden.
|
||||||
|
if (nearbyEnemies.ContainsKey(enemy))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
float distance =
|
||||||
|
Vector2.Distance(
|
||||||
|
attackCenter,
|
||||||
|
enemy.transform.position
|
||||||
|
);
|
||||||
|
|
||||||
|
nearbyEnemies.Add(enemy, distance);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gegner nach Entfernung sortieren.
|
||||||
|
List<Enemy> sortedEnemies =
|
||||||
|
new List<Enemy>(nearbyEnemies.Keys);
|
||||||
|
|
||||||
|
sortedEnemies.Sort((a, b) =>
|
||||||
|
nearbyEnemies[a].CompareTo(nearbyEnemies[b])
|
||||||
|
);
|
||||||
|
|
||||||
|
// Phase 1: Sofortiger Nahbereichsschaden.
|
||||||
|
foreach (Enemy enemy in sortedEnemies)
|
||||||
|
{
|
||||||
|
if (remainingPierce <= 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (enemy == null || enemy.IsDead)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!hitEnemies.Add(enemy))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
enemy.TakeDamage(combatStats.damagePerHit);
|
||||||
|
|
||||||
|
remainingPierce--;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kein Pierce mehr übrig:
|
||||||
|
// Der Angriff endet ohne Projektil.
|
||||||
|
if (remainingPierce <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Phase 2: Normales Projektil direkt an der Spitze.
|
||||||
GameObject bulletObject = Instantiate(
|
GameObject bulletObject = Instantiate(
|
||||||
bulletPrefab,
|
bulletPrefab,
|
||||||
tip.position,
|
tip.position,
|
||||||
@@ -178,7 +273,7 @@ public class Turret : MonoBehaviour
|
|||||||
if (bullet == null)
|
if (bullet == null)
|
||||||
{
|
{
|
||||||
Debug.LogError(
|
Debug.LogError(
|
||||||
"TowerShooting: Bullet Prefab besitzt kein TowerBullet-Skript!",
|
"Turret: Bullet Prefab besitzt kein Bullet-Skript!",
|
||||||
bulletObject
|
bulletObject
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -186,24 +281,76 @@ public class Turret : MonoBehaviour
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Abstand zwischen Drehpunkt und Geschützspitze berechnen.
|
||||||
|
float muzzleOffset = Vector2.Distance(
|
||||||
|
turret.position,
|
||||||
|
tip.position
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verbleibende Flugreichweite berechnen.
|
||||||
|
float bulletRange = Mathf.Max(
|
||||||
|
0f,
|
||||||
|
combatStats.range - muzzleOffset
|
||||||
|
);
|
||||||
|
|
||||||
bullet.Initialize(
|
bullet.Initialize(
|
||||||
tip.up,
|
tip.up,
|
||||||
bulletSpeed,
|
bulletSpeed,
|
||||||
combatStats.damagePerHit,
|
combatStats.damagePerHit,
|
||||||
combatStats.range
|
bulletRange,
|
||||||
|
remainingPierce,
|
||||||
|
hitEnemies
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDrawGizmosSelected()
|
private void OnDrawGizmosSelected()
|
||||||
{
|
{
|
||||||
if (towerData == null)
|
// Reguläre Angriffsreichweite.
|
||||||
return;
|
if (towerData != null)
|
||||||
|
{
|
||||||
|
Gizmos.color = Color.red;
|
||||||
|
|
||||||
Gizmos.color = Color.red;
|
Gizmos.DrawWireSphere(
|
||||||
|
transform.position,
|
||||||
|
towerData.combat.range
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Gizmos.DrawWireSphere(
|
// Nahbereich und Geschützpositionen.
|
||||||
transform.position,
|
if (turret != null && tip != null)
|
||||||
towerData.combat.range
|
{
|
||||||
);
|
float radius = Vector2.Distance(
|
||||||
|
turret.position,
|
||||||
|
tip.position
|
||||||
|
);
|
||||||
|
|
||||||
|
// Nahbereichskreis.
|
||||||
|
Gizmos.color = Color.yellow;
|
||||||
|
|
||||||
|
Gizmos.DrawWireSphere(
|
||||||
|
turret.position,
|
||||||
|
radius
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verbindung zwischen Drehpunkt und Spitze.
|
||||||
|
Gizmos.DrawLine(
|
||||||
|
turret.position,
|
||||||
|
tip.position
|
||||||
|
);
|
||||||
|
|
||||||
|
// Drehpunkt markieren.
|
||||||
|
Gizmos.DrawSphere(
|
||||||
|
turret.position,
|
||||||
|
0.07f
|
||||||
|
);
|
||||||
|
|
||||||
|
// Geschützspitze markieren.
|
||||||
|
Gizmos.color = Color.cyan;
|
||||||
|
|
||||||
|
Gizmos.DrawSphere(
|
||||||
|
tip.position,
|
||||||
|
0.09f
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user