...
 
Commits (2)
......@@ -8,7 +8,13 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: Wasser-Gegner
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorParameters:
- m_Name: isAttacking
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
......@@ -22,6 +28,32 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &1102010418012115378
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Water_idle_forReal
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: 43862c1391327ac41952364518c3f69b, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102942859020729236
AnimatorState:
serializedVersion: 5
......@@ -59,7 +91,10 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102942859020729236}
m_Position: {x: 264, y: 120, z: 0}
m_Position: {x: 516, y: 120, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102010418012115378}
m_Position: {x: 312, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
......@@ -69,4 +104,4 @@ AnimatorStateMachine:
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: 1102942859020729236}
m_DefaultState: {fileID: 1102010418012115378}
......@@ -21,25 +21,35 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 21300000, guid: c6751340f763afd4386451a1cdbb83c1, type: 3}
- time: 0.41666666
value: {fileID: 21300000, guid: 8ef716ef45636194fa76d7d288174674, type: 3}
- time: 0.8333333
value: {fileID: 21300000, guid: a5d80707b1aa410419262032c387268c, type: 3}
- time: 0.125
value: {fileID: 21300000, guid: 52daa80140e84de4f9d325b162d6ff44, type: 3}
- time: 0.25
value: {fileID: 21300000, guid: 7643b8e57284e1544871021f81166d57, type: 3}
- time: 0.375
value: {fileID: 21300000, guid: 049a6fc198d4e264d956f2b454f31c1f, type: 3}
- time: 0.5
value: {fileID: 21300000, guid: f70d8b9a7d6cb754aa3d92576bceac08, type: 3}
- time: 0.625
value: {fileID: 21300000, guid: 3bfd79b50e229084ebc4824b3f3a4715, type: 3}
- time: 0.75
value: {fileID: 21300000, guid: 8e24caf0e6cd9f8439d1e7f480146ec0, type: 3}
- time: 0.875
value: {fileID: 21300000, guid: 7f2420dd84db1c14e86eaba5260c9ad9, type: 3}
- time: 1
value: {fileID: 21300000, guid: f70d8b9a7d6cb754aa3d92576bceac08, type: 3}
- time: 1.125
value: {fileID: 21300000, guid: 049a6fc198d4e264d956f2b454f31c1f, type: 3}
- time: 1.25
value: {fileID: 21300000, guid: 3eb5558fc0d65844f93326f49791f59b, type: 3}
- time: 1.6666666
value: {fileID: 21300000, guid: 48d46ab26feb0dd43bc4c6cc6afc2de3, type: 3}
- time: 2.0833333
value: {fileID: 21300000, guid: c590d180f46456842969c68ede439cf5, type: 3}
- time: 2.5
value: {fileID: 21300000, guid: c7efa437e76b59249aaa28fce3fbb91e, type: 3}
- time: 2.9166667
value: {fileID: 21300000, guid: 60bb36759fbe0f64ca866fca74adc900, type: 3}
value: {fileID: 21300000, guid: 7643b8e57284e1544871021f81166d57, type: 3}
- time: 1.375
value: {fileID: 21300000, guid: 52daa80140e84de4f9d325b162d6ff44, type: 3}
- time: 1.5
value: {fileID: 21300000, guid: c6751340f763afd4386451a1cdbb83c1, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
......@@ -55,24 +65,29 @@ AnimationClip:
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 21300000, guid: c6751340f763afd4386451a1cdbb83c1, type: 3}
- {fileID: 21300000, guid: 8ef716ef45636194fa76d7d288174674, type: 3}
- {fileID: 21300000, guid: a5d80707b1aa410419262032c387268c, type: 3}
- {fileID: 21300000, guid: 3eb5558fc0d65844f93326f49791f59b, type: 3}
- {fileID: 21300000, guid: 48d46ab26feb0dd43bc4c6cc6afc2de3, type: 3}
- {fileID: 21300000, guid: c590d180f46456842969c68ede439cf5, type: 3}
- {fileID: 21300000, guid: c7efa437e76b59249aaa28fce3fbb91e, type: 3}
- {fileID: 21300000, guid: 60bb36759fbe0f64ca866fca74adc900, type: 3}
- {fileID: 21300000, guid: 52daa80140e84de4f9d325b162d6ff44, type: 3}
- {fileID: 21300000, guid: 7643b8e57284e1544871021f81166d57, type: 3}
- {fileID: 21300000, guid: 049a6fc198d4e264d956f2b454f31c1f, type: 3}
- {fileID: 21300000, guid: f70d8b9a7d6cb754aa3d92576bceac08, type: 3}
- {fileID: 21300000, guid: 3bfd79b50e229084ebc4824b3f3a4715, type: 3}
- {fileID: 21300000, guid: 8e24caf0e6cd9f8439d1e7f480146ec0, type: 3}
- {fileID: 21300000, guid: 7f2420dd84db1c14e86eaba5260c9ad9, type: 3}
- {fileID: 21300000, guid: f70d8b9a7d6cb754aa3d92576bceac08, type: 3}
- {fileID: 21300000, guid: 049a6fc198d4e264d956f2b454f31c1f, type: 3}
- {fileID: 21300000, guid: 7643b8e57284e1544871021f81166d57, type: 3}
- {fileID: 21300000, guid: 52daa80140e84de4f9d325b162d6ff44, type: 3}
- {fileID: 21300000, guid: c6751340f763afd4386451a1cdbb83c1, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 3
m_StopTime: 1.625
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
......@@ -86,4 +101,11 @@ AnimationClip:
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
m_Events:
- time: 1.5
functionName: changeAnim
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
%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: Water_idle_forReal
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 21300000, guid: 8ef716ef45636194fa76d7d288174674, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 1
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
pptrCurveMapping:
- {fileID: 21300000, guid: 8ef716ef45636194fa76d7d288174674, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
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: []
fileFormatVersion: 2
guid: 43862c1391327ac41952364518c3f69b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
......@@ -109,9 +109,9 @@ SpriteRenderer:
m_SortingLayerID: 1206248169
m_SortingLayer: 3
m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: 55c907e49d2beae438fe9ce83d62cb99, type: 3}
m_Sprite: {fileID: 21300000, guid: 0161ef6db3b4e8e42875f5a25535bd75, type: 3}
m_Color: {r: 0.990566, g: 0.990566, b: 0.990566, a: 1}
m_FlipX: 0
m_FlipX: 1
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.2, y: 0.2}
......
......@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 1377908511}
- component: {fileID: 1377908513}
- component: {fileID: 1377908512}
m_Layer: 14
m_Layer: 9
m_Name: GroundCheck
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -26,7 +26,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1377908510}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.54, y: 0.1, z: 0}
m_LocalPosition: {x: 0.301, y: 0.013, z: 0}
m_LocalScale: {x: 0.3846154, y: 0.3846154, z: 0.3846154}
m_Children: []
m_Father: {fileID: 4738352637052488}
......@@ -222,10 +222,12 @@ MonoBehaviour:
weight: 3
isPerformingAction: 0
Erdangriff: {fileID: 7480494801806484534}
attackRange: 3
attackRange: 2
attackTime: 0.8
speed: 20
target: {fileID: 4001262588988459912}
damage: 1
thrust: 30
origin: {fileID: 4001262588988459912}
--- !u!114 &1329814112
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -241,7 +243,7 @@ MonoBehaviour:
weight: 2
isPerformingAction: 0
speed: 5
distance: 1.8
distance: 2
groundDetection: {fileID: 1377908511}
--- !u!1 &7480494801806484534
GameObject:
......@@ -314,7 +316,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b4c5235d64f63fa4bb18488fb942c207, type: 3}
m_Name:
m_EditorClassIdentifier:
thrust: 30
enemyPosition: {fileID: 4738352637052488}
--- !u!212 &4099466460450311807
SpriteRenderer:
......@@ -374,7 +375,7 @@ GameObject:
m_Component:
- component: {fileID: 4001262588988459912}
m_Layer: 14
m_Name: Target
m_Name: Origin
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -388,7 +389,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8415167654720024603}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.807, y: -0.05, z: 0}
m_LocalPosition: {x: 0.07, y: -0.05, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4738352637052488}
......
......@@ -15,7 +15,8 @@ GameObject:
- component: {fileID: 95191711148098072}
- component: {fileID: 7642390674257080637}
- component: {fileID: 2887302863579586647}
- component: {fileID: 654996731500128091}
- component: {fileID: 4893693792893340402}
- component: {fileID: 2798128171951624880}
m_Layer: 14
m_Name: Wasser-Gegner
m_TagString: Water
......@@ -31,10 +32,11 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1634356314439590}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -809.96, y: -198.56, z: 0}
m_LocalScale: {x: 2.6, y: 2.6, z: 2.6}
m_LocalPosition: {x: -810.1, y: -198.37, z: 0}
m_LocalScale: {x: 4, y: 4, z: 2.6}
m_Children:
- {fileID: 4632333845714261479}
- {fileID: 6504666519456782195}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -93,10 +95,10 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -480944179
m_SortingLayer: 2
m_SortingLayerID: 1206248169
m_SortingLayer: 3
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 324760aa895f13d4eb9cb491a312ba36, type: 3}
m_Sprite: {fileID: 21300000, guid: 8ef716ef45636194fa76d7d288174674, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 1
m_FlipY: 0
......@@ -151,7 +153,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 92a90f5cf106fa548bfb90c03a6aa928, type: 3}
m_Name:
m_EditorClassIdentifier:
weight: 5
weight: 2
isPerformingAction: 0
speed: 4
distance: 1.5
......@@ -174,8 +176,34 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!61 &654996731500128091
BoxCollider2D:
--- !u!114 &4893693792893340402
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1634356314439590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 935c00ad42001a249aa97ad9bde23785, type: 3}
m_Name:
m_EditorClassIdentifier:
weight: 3
isPerformingAction: 0
Cooldown: 3
attackRange: 6
damage: 1
destroyTime: 1
thrust: 20
fireBall: {fileID: 7588789901055592565, guid: dadce81f77377be44b24465ec2b66fea,
type: 3}
volleySize: 1
launchPower: 10
attackSpeed: 0.5
buildUpTime: 0.8
shotspawn: {fileID: 6504666519456782195}
--- !u!70 &2798128171951624880
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
......@@ -187,19 +215,39 @@ BoxCollider2D:
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.08878693, y: -0.3043819}
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: 0.4, y: 0.41}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.50057274, y: 0.3546457}
m_EdgeRadius: 0
m_Offset: {x: -0.16350634, y: -0.3511535}
m_Size: {x: 0.45320204, y: 0.23337552}
m_Direction: 1
--- !u!1 &7673804308825124503
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6504666519456782195}
m_Layer: 14
m_Name: ShotSpawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6504666519456782195
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7673804308825124503}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.409, y: -0.298, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4738352637052488}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8757578769013443562
GameObject:
m_ObjectHideFlags: 0
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7588789901055592565
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5673243409365295940}
- component: {fileID: 8382647395794564539}
- component: {fileID: 707565156377968333}
- component: {fileID: 7928429373142515012}
- component: {fileID: 8237559276284760939}
- component: {fileID: 5473739827322462943}
m_Layer: 12
m_Name: Enemy_WaterAttack
m_TagString: Water
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5673243409365295940
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 6, y: 6, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8382647395794564539
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
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_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1206248169
m_SortingLayer: 3
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: dc92df69ab762f6429dbc7390caa5856, type: 3}
m_Color: {r: 0.9673407, g: 0.9671146, b: 0.9716981, a: 1}
m_FlipX: 1
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!50 &707565156377968333
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 3
m_Material: {fileID: 6200000, guid: 58a62fd7692ebb24bbefaaac19fed6fc, type: 2}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!95 &7928429373142515012
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 58870b5662ee7614dafb40c42a55cdd5, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!70 &8237559276284760939
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.008341174, y: -0.00032437945}
m_Size: {x: 0.21489131, y: 0.12061167}
m_Direction: 1
--- !u!114 &5473739827322462943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 246247adacfc06b49a6ae7de0dfa25fa, type: 3}
m_Name:
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: dadce81f77377be44b24465ec2b66fea
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -22,7 +22,7 @@ public class AI_WindAttack : WeightedAction
void Start()
{
myAI = GetComponent<AI_Core>();
}
}
void CheckConditions()
{
......@@ -36,8 +36,8 @@ public class AI_WindAttack : WeightedAction
public override void performAction()
{
target = GameObject.FindGameObjectWithTag("Player");
myAI.turnEnemy();
target = myAI.getPlayer();
Vector3 attackdir = target.transform.position - transform.position;
attackdir.Normalize();
......
......@@ -20,7 +20,7 @@ public class AI_WindProjectile : MonoBehaviour
}
if (other.CompareTag("Player"))
{
Vector2 dir = other.GetComponentInParent<Transform>().position - transform.position;
Vector2 dir = new Vector2(other.GetComponentInParent<Transform>().position.x - transform.position.x, 0);
dir.Normalize();
dir *= thrust;
other.attachedRigidbody.AddForce(dir, ForceMode2D.Impulse);
......
......@@ -19,7 +19,13 @@ public class RockAttack : WeightedAction {
public float speed;
public Transform target;
public int damage;
public float thrust;
public Transform origin;
private GameObject player;
private Vector3 startPos;
......@@ -35,6 +41,8 @@ public class RockAttack : WeightedAction {
isPerformingAction = false;
velocity = Vector3.zero;
player = myAI.getPlayer();
Erdangriff.GetComponent<rockCollider>().setValues(damage, thrust);
}
void CheckConditions() {
......@@ -45,11 +53,14 @@ public class RockAttack : WeightedAction {
{
return;
}
player =
myAI.getPlayer();
timePassed = Time.time;
attackFinished = timePassed + attackTime;
startPos = Erdangriff.transform.position;
endpos = target.position;
startPos = origin.position;
endpos = new Vector2(player.transform.position.x, origin.position.y);
myAI.turnEnemy();
isPerformingAction = true;
}
......
......@@ -4,7 +4,8 @@ using UnityEngine;
public class rockCollider : MonoBehaviour
{
public float thrust;
private float thrust;
private int damage;
public Transform enemyPosition;
private void OnTriggerEnter2D(Collider2D other)
......@@ -15,6 +16,13 @@ public class rockCollider : MonoBehaviour
dir.Normalize();
dir *= thrust;
other.attachedRigidbody.AddForce(dir, ForceMode2D.Impulse);
other.GetComponentInParent<Life>().Damage(damage);
}
}
public void setValues(int damage, float thrust)
{
this.damage = damage;
this.thrust = thrust;
}
}
......@@ -13,8 +13,10 @@ public class AI_FireAttack : WeightedAction
public int damage;
public float destroyTime;
public GameObject fireBall;
private GameObject player;
public int volleySize;
public float launchPower;
private float firePower;
public float attackSpeed;
public Transform shotspawn;
......@@ -38,6 +40,7 @@ public class AI_FireAttack : WeightedAction
public override void performAction()
{
myAI.turnEnemy();
if (restCooldown <= 0)
{
StartCoroutine(fireVolley());
......@@ -51,21 +54,20 @@ public class AI_FireAttack : WeightedAction
IEnumerator fireVolley()
{
target = GameObject.FindGameObjectWithTag("Player");
launchPower = 10;
player = myAI.getPlayer();
firePower = launchPower;
for (int i = 0; i < volleySize; i++)
{
//launchPower = Random.Range(10, 20);
launchPower += 3;
firePower += 3;
GameObject projectile = Instantiate(fireBall, shotspawn.position, shotspawn.rotation);
projectile.GetComponent<AI_FireProjectile>().setValues(damage, destroyTime);
if (target.transform.position.x > this.transform.position.x)
if (player.transform.position.x > this.transform.position.x)
{
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(launchPower, launchPower);
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(firePower, firePower);
}
else
{
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(-launchPower, launchPower);
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(-firePower, firePower);
}
yield return new WaitForSeconds(attackSpeed);
}
......
......@@ -16,7 +16,7 @@ public class AI_FireProjectile : MonoBehaviour
{
return;
}
if (other.CompareTag("Player"))
if (other.CompareTag("Player"))
{
other.GetComponentInParent<Life>().Damage(damage);
}
......
......@@ -5,9 +5,11 @@ using System.Collections.Generic;
public class AI_Core : MonoBehaviour {
public List<WeightedAction> desiredAction;
void Start () {
private GameObject player;
void Start () {
player = GameObject.FindGameObjectWithTag("Player");
}
void FixedUpdate ()
......@@ -40,12 +42,16 @@ public class AI_Core : MonoBehaviour {
}
public GameObject findNearestPlayer()
public GameObject getPlayer()
{
return player;
}
public void turnEnemy()
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
if(player == null)
{
return null;
return;
}
if (player.transform.position.x > this.transform.position.x)
{
......@@ -55,13 +61,10 @@ public class AI_Core : MonoBehaviour {
{
transform.eulerAngles = new Vector3(0, -180, 0);
}
return player;
}
public bool rangeCheckFailed(Transform pos, float range)
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
if (player == null)
{
return true;
......
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
public class AI_DashAttack : WeightedAction
{
GameObject nearestPlayer;
AI_Core myAI;
private float restCooldown;
private float windUpCooldown;
private bool windUpReady;
private bool attackDone;
private Rigidbody2D body;
public GameObject windAttack;
public float Cooldown;
public float attackRange;
public float dashSpeed;
public float windUpTime;
// Use this for initialization
void Start()
{
myAI = GetComponent<AI_Core>();
}
void CheckConditions()
{
nearestPlayer = myAI.findNearestPlayer();
float dist = Vector2.Distance(transform.position, nearestPlayer.transform.position);
if (!isPerformingAction)
{
if (dist > attackRange)
{
return;
}
}
myAI.desiredAction.Add(this);
}
public override void performAction()
{
Vector3 attackdir = nearestPlayer.transform.position - transform.position;
attackdir.Normalize();
if (windUpCooldown <= 0 && attackDone)
{
if (isPerformingAction)
{
isPerformingAction = false;
return;
}
StartCoroutine(windUp(attackdir));
windUpCooldown = windUpTime;
isPerformingAction = true;
}
else
{
restCooldown -= Time.deltaTime;
}
if (restCooldown <= 0 && windUpReady)
{
Fire(attackdir);
restCooldown = Cooldown;
}
else
{
restCooldown -= Time.deltaTime;
}
}
public void Fire(Vector3 attackdir)
{
GameObject projectile = Instantiate(windAttack, transform.position + attackdir, Quaternion.AngleAxis(Mathf.Atan2(-attackdir.y, -attackdir.x) * Mathf.Rad2Deg + 180, Vector3.forward));
body = projectile.GetComponent<Rigidbody2D>();
Vector3 rotatedVector = Quaternion.AngleAxis(0, Vector3.forward) * attackdir;
body.velocity = new Vector2(rotatedVector.x * 5, rotatedVector.y * 5);
}
IEnumerator windUp(Vector3 attackdir)
{
float updateTarget = windUpTime;
//float currentTime = 0.0f;
//do
//{
// if (target != null)
// {
// if (currentTime >= updateTarget)
// {
// dir = target.transform.position - this.transform.position;
// dir.Normalize();
// updateTarget += timeToRefresh;
// }
// Vector3 newPosition = dir * movementSpeed * Time.deltaTime;
// transform.position += newPosition;
// }
// deathZone.transform.localScale = Vector3.Lerp(originalScale, destinationScale, currentTime / duration);
// currentTime += Time.deltaTime;
// AnimateEnemy();
yield return null;
//} while (currentTime <= duration);
}
}
using UnityEngine;
public class AI_PatrolPlatform : WeightedAction
{
AI_Core myAI;
Transform pos1, pos2;
private bool movingRight;
public float speed;
public float distance;
public Transform groundDetection;
// Use this for initialization
void Start()
{
myAI = GetComponent<AI_Core>();
movingRight = true;
}
void CheckConditions()
{
myAI.desiredAction.Add(this);
}
public override void performAction()
{
transform.Translate(Vector2.right * Time.deltaTime * speed);
RaycastHit2D groundInfo = Physics2D.Raycast(groundDetection.position, Vector3.down, distance, 1<<LayerMask.NameToLayer("Ground"));
if (!groundInfo.collider == false)
{
if(!groundInfo.collider.gameObject.CompareTag("Moving")) return;
}
turn();
}
public void turn()
{
if (movingRight == true)
{
transform.eulerAngles = new Vector3(0, -180, 0);
movingRight = false;
}
else
{
transform.eulerAngles = new Vector3(0, 0, 0);
movingRight = true;
}
}
private void OnDrawGizmos()
{
Gizmos.color = Color.red;
Gizmos.DrawLine(groundDetection.position, groundDetection.position + Vector3.down * distance);
}
}
fileFormatVersion: 2
guid: bb4a718ca19c7394999fdcd103f9129a
timeCreated: 1536939600
guid: 92a90f5cf106fa548bfb90c03a6aa928
timeCreated: 1536953209
licenseType: Free
MonoImporter:
externalObjects: {}
......
......@@ -18,7 +18,7 @@ public class AI_WandersV2 : WeightedAction
private Vector3 velocity = Vector3.zero;
public float moveTime;
public float chillTime;
public float speed;
private Vector3 dist;
......@@ -41,24 +41,23 @@ public class AI_WandersV2 : WeightedAction
public override void performAction()
{
transform.position = Vector3.SmoothDamp(transform.position, targetPos.position, ref velocity, moveTime);
transform.position = Vector3.MoveTowards(transform.position, targetPos.position, speed*Time.deltaTime);
}
void nextPatrolPoint()
{
do
{
patrolSpot = new Vector3(Random.Range(minX, maxX), Random.Range(minY, maxY), -1);
patrolSpot = new Vector3(Random.Range(minX, maxX), Random.Range(minY, maxY), transform.position.z);
dist = transform.position - patrolSpot;
} while (dist.magnitude < 4f);
targetPos.position = patrolSpot;
Invoke("nextPatrolPoint", moveTime+chillTime);
}
//transform.LookAt(targetPos.position, Vector3.up);
transform.right = new Vector2 (targetPos.position.x - transform.position.x, 0);
velocity = Vector3.zero;
private void OnCollisionStay2D(Collision2D collision)
{
nextPatrolPoint();
Invoke("nextPatrolPoint", moveTime);
}
}
......@@ -8,7 +8,7 @@ public class isHittingWall : MonoBehaviour
{
if (collision.gameObject.layer == LayerMask.NameToLayer("Ground") || collision.gameObject.layer == LayerMask.NameToLayer("Enemy"))
{
this.GetComponentInParent<AI_WaterAttack>().turn();
this.GetComponentInParent<AI_PatrolPlatform>().turn();
}
}
......
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
public class AI_WaterAttack : WeightedAction
{
AI_Core myAI;
GameObject target;
AI_Core myAI;
private float restCooldown;
public float Cooldown;
Transform pos1, pos2;
public float attackRange;
public int damage;
public float destroyTime;
public float thrust;
public GameObject fireBall;
private GameObject player;
public int volleySize;
public float launchPower;
public float attackSpeed;
public float buildUpTime;
public Transform shotspawn;
private Animator anim;
private bool movingRight;
private Rigidbody2D body;
public float speed;
public float distance;
public Transform groundDetection;
// Use this for initialization
void Start()
{
myAI = GetComponent<AI_Core>();
movingRight = true;
}
void CheckConditions()
// Use this for initialization
void Start()
{
myAI.desiredAction.Add(this);
}
public override void performAction()
{
transform.Translate(Vector2.right * Time.deltaTime * speed);
RaycastHit2D groundInfo = Physics2D.Raycast(groundDetection.position, Vector3.down, distance, 1<<LayerMask.NameToLayer("Ground"));
myAI = GetComponent<AI_Core>();
player = myAI.getPlayer();
anim = GetComponent<Animator>();
}
if (!groundInfo.collider == false)
void CheckConditions()
{
if (myAI.rangeCheckFailed(transform, attackRange))
{
if(!groundInfo.collider.gameObject.CompareTag("Moving")) return;
return;
}
turn();
myAI.desiredAction.Add(this);
}
public void turn()
public override void performAction()
{
if (movingRight == true)
myAI.turnEnemy();
if (restCooldown <= 0)
{
transform.eulerAngles = new Vector3(0, -180, 0);
movingRight = false;
anim.Play("Water_Idle");
StartCoroutine(fireVolley());
restCooldown = Cooldown;
}
else
{
transform.eulerAngles = new Vector3(0, 0, 0);
movingRight = true;
restCooldown -= Time.deltaTime;
}
}
IEnumerator fireVolley()
{
player = myAI.getPlayer();
yield return new WaitForSeconds(buildUpTime);
for (int i = 0; i < volleySize; i++)
{
launchPower += 3;
GameObject projectile = Instantiate(fireBall, shotspawn.position, shotspawn.rotation);
projectile.GetComponent<AI_WaterProjectile>().setValues(damage, destroyTime, thrust);
if (player.transform.position.x > this.transform.position.x)
{
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(launchPower, launchPower / 2);
}
else
{
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(-launchPower, launchPower / 2);
}
yield return new WaitForSeconds(attackSpeed);
}
}
private void OnDrawGizmos()
public void changeAnim()
{
Gizmos.color = Color.red;
Gizmos.DrawLine(groundDetection.position, groundDetection.position + Vector3.down * distance);
anim.Play("Water_idle_forReal");
}
}
fileFormatVersion: 2
guid: 92a90f5cf106fa548bfb90c03a6aa928
timeCreated: 1536953209
guid: 935c00ad42001a249aa97ad9bde23785
timeCreated: 1536939600
licenseType: Free
MonoImporter:
externalObjects: {}
......
using UnityEngine;
public class AI_WaterProjectile : MonoBehaviour
{
private int damage;
private float destroyTime;
private float thrust;
void Destroy()
{
Destroy(gameObject);
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("EnemyShot") || other.gameObject.layer == LayerMask.NameToLayer("Ground") || other.gameObject.layer == LayerMask.NameToLayer("Enemy"))
{
return;
}
if (other.CompareTag("Player"))
{
Vector2 dir = new Vector2(other.GetComponentInParent<Transform>().position.x - transform.position.x, 0);
dir.Normalize();
dir *= thrust;
other.attachedRigidbody.AddForce(dir, ForceMode2D.Impulse);
other.GetComponentInParent<Life>().Damage(damage);
}
Debug.Log("test");
Destroy();
}
public void setValues(int damage, float destroyTime, float thrust)
{
this.damage = damage;
this.destroyTime = destroyTime;
this.thrust = thrust;
Invoke("Destroy", destroyTime);
}
}
fileFormatVersion: 2
guid: 246247adacfc06b49a6ae7de0dfa25fa
timeCreated: 1536950083
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: