Commit d8386e5c authored by mthiele2's avatar mthiele2
Browse files

Wasser-AI Update

parent 4ec9cf06
......@@ -15,7 +15,7 @@ GameObject:
- component: {fileID: 5567333940966867164}
m_Layer: 0
m_Name: Pre_PlayerFireAttack
m_TagString: EnemyShot
m_TagString: Fire
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -29,7 +29,7 @@ Transform:
m_GameObject: {fileID: 1870586037468468}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.99, y: 1.86, z: -1}
m_LocalScale: {x: 1.49, y: 1.68, z: 1}
m_LocalScale: {x: 3, y: 3, z: 3}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......
......@@ -15,9 +15,10 @@ GameObject:
- component: {fileID: 114326583413855364}
- component: {fileID: 95191711148098072}
- component: {fileID: 7642390674257080637}
- component: {fileID: 2887302863579586647}
m_Layer: 0
m_Name: Wasser-Gegner
m_TagString: Enemy
m_TagString: Water
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -49,7 +50,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10000
m_Mass: 10
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 5
......@@ -145,7 +146,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
aggroDist: 15
attackDist: 20
detectionRange: 50
isInCombat: 0
desiredAction: []
......@@ -180,11 +180,24 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 92a90f5cf106fa548bfb90c03a6aa928, type: 3}
m_Name:
m_EditorClassIdentifier:
weight: 0
weight: 5
isPerformingAction: 0
speed: 4
distance: 2
distance: 1.5
groundDetection: {fileID: 4632333845714261479}
--- !u!114 &2887302863579586647
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: 3c0ce2eb523274b6fa61fccbf0227d85, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MaxLife: 1
--- !u!1 &8757578769013443562
GameObject:
m_ObjectHideFlags: 0
......@@ -194,6 +207,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 4632333845714261479}
- component: {fileID: 630870635}
- component: {fileID: 630870634}
m_Layer: 0
m_Name: GroundCheck
m_TagString: Untagged
......@@ -209,9 +224,47 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8757578769013443562}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.286, y: 0.009, z: 0}
m_LocalPosition: {x: 0.216, y: 0.084, z: 0}
m_LocalScale: {x: 0.3846154, y: 0.3846154, z: 0.3846154}
m_Children: []
m_Father: {fileID: 4738352637052488}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &630870635
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8757578769013443562}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.1, y: 0.1}
m_EdgeRadius: 0
--- !u!114 &630870634
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8757578769013443562}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5f53fd08a8579644bb23274b07d6f11, type: 3}
m_Name:
m_EditorClassIdentifier:
......@@ -49,7 +49,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 10000
m_Mass: 3
m_LinearDrag: 5
m_AngularDrag: 0.05
m_GravityScale: 0
......@@ -145,7 +145,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
aggroDist: 6
detectionRange: 25
detectionRange: 10
isInCombat: 0
desiredAction: []
--- !u!114 &114716552753954768
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3962879857309384166
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3962879857309384162}
- component: {fileID: 3962879857309384165}
- component: {fileID: 3962879857309384164}
- component: {fileID: 6533165481742465260}
- component: {fileID: 5372445436103654034}
m_Layer: 0
m_Name: Destroyable_Thing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3962879857309384162
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962879857309384166}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.69, y: 0.29, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &3962879857309384165
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962879857309384166}
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: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d0cee4e8b659c5646ac1e205b88a3256, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!61 &3962879857309384164
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962879857309384166}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!50 &6533165481742465260
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962879857309384166}
m_BodyType: 2
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &5372445436103654034
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962879857309384166}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7560b9888608fa84c8042ef27348d4d3, type: 3}
m_Name:
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
guid: 926b80f66a4f61b428fa10deff5f7842
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
......
......@@ -316,6 +316,7 @@ MonoBehaviour:
volleySize: 3
launchPower: 20
attackSpeed: 0.5
shotSpawn: {fileID: 0}
fireBall: {fileID: 1870586037468468, guid: e5f7d8895a3df6547bca926919077d19, type: 3}
--- !u!1 &7340435369394276825
GameObject:
......
......@@ -125,11 +125,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_LocalPosition.x
value: 6.7150345
value: 24.49
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_LocalPosition.y
value: 0.48720074
value: 4.48
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_LocalPosition.z
......@@ -153,7 +153,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_RootOrder
value: 5
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -167,16 +167,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7642390674257080637, guid: 49ad5eee708571d449789cb994b54fcb,
type: 3}
propertyPath: weight
value: 5
objectReference: {fileID: 0}
- target: {fileID: 50191559781069916, guid: 49ad5eee708571d449789cb994b54fcb,
type: 3}
propertyPath: m_Mass
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
--- !u!1001 &252735506
......@@ -229,7 +219,7 @@ PrefabInstance:
- target: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
type: 3}
propertyPath: m_RootOrder
value: 1
value: 2
objectReference: {fileID: 0}
- target: {fileID: 8746327460217138312, guid: 615b74be12ac7ec4e9b491a7ef5cbbe1,
type: 3}
......@@ -303,7 +293,7 @@ PrefabInstance:
- target: {fileID: 7340435369038607274, guid: 938701439f7d9654da1b920d73ccf2cc,
type: 3}
propertyPath: m_RootOrder
value: 3
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7340435369038607274, guid: 938701439f7d9654da1b920d73ccf2cc,
type: 3}
......@@ -326,7 +316,7 @@ PrefabInstance:
objectReference: {fileID: 1997262710}
- target: {fileID: 1475208695, guid: 938701439f7d9654da1b920d73ccf2cc, type: 3}
propertyPath: volleySize
value: 20
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1475208695, guid: 938701439f7d9654da1b920d73ccf2cc, type: 3}
propertyPath: launchPower
......@@ -338,7 +328,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1475208695, guid: 938701439f7d9654da1b920d73ccf2cc, type: 3}
propertyPath: Cooldown
value: 1
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 938701439f7d9654da1b920d73ccf2cc, type: 3}
......@@ -603,7 +593,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &664630839
PrefabInstance:
......@@ -646,7 +636,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_RootOrder
value: 4
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4738352637052488, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -660,11 +650,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 50191559781069916, guid: 6cd7f8e10f89642fd88661db0d3f3827,
type: 3}
propertyPath: m_Mass
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cd7f8e10f89642fd88661db0d3f3827, type: 3}
--- !u!1 &719626315
......@@ -847,7 +832,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &731052799
GameObject:
......@@ -1012,8 +997,77 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &1052745736
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3962879857309384166, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_Name
value: Destroyable_Thing
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalPosition.x
value: 22.190775
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalPosition.y
value: 4.463975
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3962879857309384162, guid: 926b80f66a4f61b428fa10deff5f7842,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 926b80f66a4f61b428fa10deff5f7842, type: 3}
--- !u!1 &1475208694 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7340435369038607268, guid: 938701439f7d9654da1b920d73ccf2cc,
......@@ -1182,7 +1236,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1561658102
GameObject:
......@@ -1328,7 +1382,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1855488229
GameObject:
......@@ -1492,7 +1546,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1936446593
PrefabInstance:
......@@ -1544,7 +1598,7 @@ PrefabInstance:
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
propertyPath: m_RootOrder
value: 2
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5794390821522793468, guid: 4512b8eb550115443bbba2ecd59a960c,
type: 3}
......@@ -1827,7 +1881,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!68 &2027679589
EdgeCollider2D:
......
......@@ -31,16 +31,21 @@ public class AI_WaterAttack : WeightedAction
RaycastHit2D groundInfo = Physics2D.Raycast(groundDetection.position, Vector2.down, distance);
if(groundInfo.collider == false)
{
if(movingRight == true)
{
transform.eulerAngles = new Vector3(0, -180, 0);
movingRight = false;
}
else
{
transform.eulerAngles = new Vector3(0, 0, 0);
movingRight = true;
}
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;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class isHittingWall : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
this.GetComponentInParent<AI_WaterAttack>().turn();
}
}