Commit 333dc944 authored by Isa's avatar Isa
Browse files

Versuch 2

parents f2576c7d f7f57ba8
...@@ -13,8 +13,8 @@ GameObject: ...@@ -13,8 +13,8 @@ GameObject:
- component: {fileID: 70840632841850180} - component: {fileID: 70840632841850180}
- component: {fileID: 212152556601460820} - component: {fileID: 212152556601460820}
- component: {fileID: 5567333940966867164} - component: {fileID: 5567333940966867164}
m_Layer: 0 m_Layer: 12
m_Name: Pre_PlayerFireAttack m_Name: FireAttack
m_TagString: Fire m_TagString: Fire
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
......
...@@ -142,3 +142,4 @@ MonoBehaviour: ...@@ -142,3 +142,4 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
destroyTime: 3 destroyTime: 3
pushFactor: 5
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &6240296448730384320 --- !u!1 &6184296985288555399
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 7732554449417407852} - component: {fileID: 8257885254229348828}
- component: {fileID: 1297297354442121813} - component: {fileID: 3590286897431027205}
- component: {fileID: 2063039573222851098} - component: {fileID: 4292658995770755931}
- component: {fileID: 5308590249232017486} m_Layer: 0
- component: {fileID: 4079281900754592225} m_Name: GameObject
m_Layer: 9 m_TagString: Untagged
m_Name: Movable_Thing m_Icon: {fileID: 0}
m_TagString: Untagged m_NavMeshLayer: 0
m_Icon: {fileID: 0} m_StaticEditorFlags: 0
m_NavMeshLayer: 0 m_IsActive: 1
m_StaticEditorFlags: 0 --- !u!4 &8257885254229348828
m_IsActive: 1 Transform:
--- !u!4 &7732554449417407852 m_ObjectHideFlags: 0
Transform: m_CorrespondingSourceObject: {fileID: 0}
m_ObjectHideFlags: 0 m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_GameObject: {fileID: 6184296985288555399}
m_PrefabAsset: {fileID: 0} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_GameObject: {fileID: 6240296448730384320} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: 133.12, y: 41.63, z: -0.017713891} m_Children: []
m_LocalScale: {x: 1, y: 1, z: 1} m_Father: {fileID: 7732554449417407852}
m_Children: [] m_RootOrder: 0
m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_RootOrder: 0 --- !u!61 &3590286897431027205
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} BoxCollider2D:
--- !u!212 &1297297354442121813 m_ObjectHideFlags: 0
SpriteRenderer: m_CorrespondingSourceObject: {fileID: 0}
m_ObjectHideFlags: 0 m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_GameObject: {fileID: 6184296985288555399}
m_PrefabAsset: {fileID: 0} m_Enabled: 1
m_GameObject: {fileID: 6240296448730384320} m_Density: 1
m_Enabled: 1 m_Material: {fileID: 0}
m_CastShadows: 0 m_IsTrigger: 0
m_ReceiveShadows: 0 m_UsedByEffector: 0
m_DynamicOccludee: 1 m_UsedByComposite: 0
m_MotionVectors: 1 m_Offset: {x: 0, y: 0}
m_LightProbeUsage: 1 m_SpriteTilingProperty:
m_ReflectionProbeUsage: 1 border: {x: 0, y: 0, z: 0, w: 0}
m_RenderingLayerMask: 1 pivot: {x: 0, y: 0}
m_RendererPriority: 0 oldSize: {x: 0, y: 0}
m_Materials: newSize: {x: 0, y: 0}
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} adaptiveTilingThreshold: 0
m_StaticBatchInfo: drawMode: 0
firstSubMesh: 0 adaptiveTiling: 0
subMeshCount: 0 m_AutoTiling: 0
m_StaticBatchRoot: {fileID: 0} serializedVersion: 2
m_ProbeAnchor: {fileID: 0} m_Size: {x: 1, y: 1}
m_LightProbeVolumeOverride: {fileID: 0} m_EdgeRadius: 0
m_ScaleInLightmap: 1 --- !u!114 &4292658995770755931
m_PreserveUVs: 0 MonoBehaviour:
m_IgnoreNormalsForChartDetection: 0 m_ObjectHideFlags: 0
m_ImportantGI: 0 m_CorrespondingSourceObject: {fileID: 0}
m_StitchLightmapSeams: 0 m_PrefabInstance: {fileID: 0}
m_SelectedEditorRenderState: 0 m_PrefabAsset: {fileID: 0}
m_MinimumChartSize: 4 m_GameObject: {fileID: 6184296985288555399}
m_AutoUVMaxDistance: 0.5 m_Enabled: 1
m_AutoUVMaxAngle: 89 m_EditorHideFlags: 0
m_LightmapParameters: {fileID: 0} m_Script: {fileID: 11500000, guid: d5c135c3fe901cf4696abeebd2ac1f28, type: 3}
m_SortingLayerID: -614652393 m_Name:
m_SortingLayer: 4 m_EditorClassIdentifier:
m_SortingOrder: 0 --- !u!1 &6240296448730384320
m_Sprite: {fileID: 21300000, guid: bc5c089e74a0d9e4cb7fe35e36ba1ddf, type: 3} GameObject:
m_Color: {r: 1, g: 1, b: 1, a: 1} m_ObjectHideFlags: 0
m_FlipX: 0 m_CorrespondingSourceObject: {fileID: 0}
m_FlipY: 0 m_PrefabInstance: {fileID: 0}
m_DrawMode: 0 m_PrefabAsset: {fileID: 0}
m_Size: {x: 2, y: 2} serializedVersion: 6
m_AdaptiveModeThreshold: 0.5 m_Component:
m_SpriteTileMode: 0 - component: {fileID: 7732554449417407852}
m_WasSpriteAssigned: 1 - component: {fileID: 1297297354442121813}
m_MaskInteraction: 0 - component: {fileID: 7986769661104333248}
m_SpriteSortPoint: 0 - component: {fileID: 762648849805719858}
--- !u!114 &2063039573222851098 m_Layer: 9
MonoBehaviour: m_Name: Movable_Thing
m_ObjectHideFlags: 0 m_TagString: Untagged
m_CorrespondingSourceObject: {fileID: 0} m_Icon: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_NavMeshLayer: 0
m_PrefabAsset: {fileID: 0} m_StaticEditorFlags: 0
m_GameObject: {fileID: 6240296448730384320} m_IsActive: 1
m_Enabled: 1 --- !u!4 &7732554449417407852
m_EditorHideFlags: 0 Transform:
m_Script: {fileID: 11500000, guid: d5c135c3fe901cf4696abeebd2ac1f28, type: 3} m_ObjectHideFlags: 0
m_Name: m_CorrespondingSourceObject: {fileID: 0}
m_EditorClassIdentifier: m_PrefabInstance: {fileID: 0}
force: 0 m_PrefabAsset: {fileID: 0}
--- !u!60 &5308590249232017486 m_GameObject: {fileID: 6240296448730384320}
PolygonCollider2D: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_ObjectHideFlags: 0 m_LocalPosition: {x: 133.12, y: 41.63, z: -0.017713891}
m_CorrespondingSourceObject: {fileID: 0} m_LocalScale: {x: 1, y: 1, z: 1}
m_PrefabInstance: {fileID: 0} m_Children:
m_PrefabAsset: {fileID: 0} - {fileID: 8257885254229348828}
m_GameObject: {fileID: 6240296448730384320} m_Father: {fileID: 0}
m_Enabled: 1 m_RootOrder: 0
m_Density: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Material: {fileID: 0} --- !u!212 &1297297354442121813
m_IsTrigger: 0 SpriteRenderer:
m_UsedByEffector: 0 m_ObjectHideFlags: 0
m_UsedByComposite: 0 m_CorrespondingSourceObject: {fileID: 0}
m_Offset: {x: 0, y: 0} m_PrefabInstance: {fileID: 0}
m_SpriteTilingProperty: m_PrefabAsset: {fileID: 0}
border: {x: 0, y: 0, z: 0, w: 0} m_GameObject: {fileID: 6240296448730384320}
pivot: {x: 0.5, y: 0.5} m_Enabled: 1
oldSize: {x: 8, y: 8} m_CastShadows: 0
newSize: {x: 2, y: 2} m_ReceiveShadows: 0
adaptiveTilingThreshold: 0.5 m_DynamicOccludee: 1
drawMode: 0 m_MotionVectors: 1
adaptiveTiling: 0 m_LightProbeUsage: 1
m_AutoTiling: 0 m_ReflectionProbeUsage: 1
m_Points: m_RenderingLayerMask: 1
m_Paths: m_RendererPriority: 0
- - {x: 1.3359375, y: -2.109375} m_Materials:
- {x: 1.4140625, y: -2.09375} - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
- {x: 1.5234375, y: -2.0703125} m_StaticBatchInfo:
- {x: 1.546875, y: -2.0625} firstSubMesh: 0
- {x: 1.7265625, y: -2} subMeshCount: 0
- {x: 1.84375, y: -1.984375} m_StaticBatchRoot: {fileID: 0}
- {x: 1.9609375, y: -1.9609375} m_ProbeAnchor: {fileID: 0}
- {x: 2.1171875, y: -1.8671875} m_LightProbeVolumeOverride: {fileID: 0}
- {x: 2.2578125, y: -1.7421875} m_ScaleInLightmap: 1
- {x: 2.3828125, y: -1.625} m_PreserveUVs: 0
- {x: 2.40625, y: -1.5859375} m_IgnoreNormalsForChartDetection: 0
- {x: 2.4140625, y: -1.546875} m_ImportantGI: 0
- {x: 2.4140625, y: -1.40625} m_StitchLightmapSeams: 0
- {x: 2.3828125, y: -1.203125} m_SelectedEditorRenderState: 0
- {x: 2.328125, y: -1} m_MinimumChartSize: 4
- {x: 2.25, y: -0.6328125} m_AutoUVMaxDistance: 0.5
- {x: 2.1484375, y: -0.125} m_AutoUVMaxAngle: 89
- {x: 2.109375, y: 0.0078125} m_LightmapParameters: {fileID: 0}
- {x: 2.0625, y: 0.1328125} m_SortingLayerID: -614652393
- {x: 2.0234375, y: 0.1875} m_SortingLayer: 4
- {x: 1.96875, y: 0.25} m_SortingOrder: 0
- {x: 1.9375, y: 0.3359375} m_Sprite: {fileID: 21300000, guid: bc5c089e74a0d9e4cb7fe35e36ba1ddf, type: 3}
- {x: 1.859375, y: 0.5} m_Color: {r: 1, g: 1, b: 1, a: 1}
- {x: 1.8203125, y: 0.5546875} m_FlipX: 0
- {x: 1.765625, y: 0.6328125} m_FlipY: 0
- {x: 1.6953125, y: 0.7265625} m_DrawMode: 0
- {x: 1.65625, y: 0.8125} m_Size: {x: 2, y: 2}
- {x: 1.609375, y: 0.9609375} m_AdaptiveModeThreshold: 0.5
- {x: 1.5859375, y: 1} m_SpriteTileMode: 0
- {x: 1.5390625, y: 1.0546875} m_WasSpriteAssigned: 1
- {x: 1.46875, y: 1.09375} m_MaskInteraction: 0
- {x: 1.390625, y: 1.1015625} m_SpriteSortPoint: 0
- {x: 1.2265625, y: 1.1015625} --- !u!50 &7986769661104333248
- {x: 1.203125, y: 1.125} Rigidbody2D:
- {x: 1.09375, y: 1.109375} serializedVersion: 4
- {x: 1.0390625, y: 1.0625} m_ObjectHideFlags: 0
- {x: 0.828125, y: 0.859375} m_CorrespondingSourceObject: {fileID: 0}
- {x: 0.609375, y: 0.6875} m_PrefabInstance: {fileID: 0}
- {x: 0.5234375, y: 0.6484375} m_PrefabAsset: {fileID: 0}
- {x: 0.46875, y: 0.640625} m_GameObject: {fileID: 6240296448730384320}
- {x: 0.3828125, y: 0.734375} m_BodyType: 0
- {x: 0.25, y: 0.9921875} m_Simulated: 1
- {x: 0.1328125, y: 1.1875} m_UseFullKinematicContacts: 0
- {x: -0.0390625, y: 1.515625} m_UseAutoMass: 0
- {x: -0.1015625, y: 1.6015625} m_Mass: 1
- {x: -0.171875, y: 1.6875} m_LinearDrag: 0
- {x: -0.21875, y: 1.78125} m_AngularDrag: 0.05
- {x: -0.25, y: 1.890625} m_GravityScale: 1
- {x: -0.265625, y: 2} m_Material: {fileID: 0}
- {x: -0.296875, y: 2.1015625} m_Interpolate: 0
- {x: -0.328125, y: 2.1484375} m_SleepingMode: 1
- {x: -0.4453125, y: 2.265625} m_CollisionDetection: 0
- {x: -0.4609375, y: 2.296875} m_Constraints: 0
- {x: -0.53125, y: 2.359375} --- !u!61 &762648849805719858
- {x: -0.6015625, y: 2.359375} BoxCollider2D:
- {x: -0.65625, y: 2.3359375} m_ObjectHideFlags: 0
- {x: -0.7421875, y: 2.3125} m_CorrespondingSourceObject: {fileID: 0}
- {x: -0.8359375, y: 2.21875} m_PrefabInstance: {fileID: 0}
- {x: -0.9765625, y: 2.0390625} m_PrefabAsset: {fileID: 0}
- {x: -1.0703125, y: 1.8984375} m_GameObject: {fileID: 6240296448730384320}
- {x: -1.171875, y: 1.71875} m_Enabled: 1
- {x: -1.2265625, y: 1.6015625} m_Density: 1
- {x: -1.3203125, y: 1.3984375} m_Material: {fileID: 0}
- {x: -1.4453125, y: 1.109375} m_IsTrigger: 0
- {x: -1.4921875, y: 1.015625} m_UsedByEffector: 0
- {x: -1.59375, y: 0.765625} m_UsedByComposite: 0
- {x: -1.7578125, y: 0.3359375} m_Offset: {x: 0, y: 0}
- {x: -1.8203125, y: 0.1953125} m_SpriteTilingProperty:
- {x: -1.9140625, y: 0.0234375} border: {x: 0, y: 0, z: 0, w: 0}
- {x: -1.9765625, y: -0.0390625} pivot: {x: 0.5, y: 0.5}
- {x: -2.046875, y: -0.0703125} oldSize: {x: 2, y: 2}
- {x: -2.09375, y: -0.1171875} newSize: {x: 2, y: 2}
- {x: -2.1953125, y: -0.234375} adaptiveTilingThreshold: 0.5
- {x: -2.25, y: -0.21875} drawMode: 0
- {x: -2.3515625, y: -0.2421875} adaptiveTiling: 0
- {x: -2.390625, y: -0.2890625} m_AutoTiling: 0
- {x: -2.4375, y: -0.390625} serializedVersion: 2
- {x: -2.4765625, y: -0.6796875} m_Size: {x: 2, y: 2}
- {x: -2.4921875, y: -0.8203125} m_EdgeRadius: 0
- {x: -2.5078125, y: -1}
- {x: -2.5390625, y: -1.3125}
- {x: -2.546875, y: -1.421875}
- {x: -2.546875, y: -1.640625}
- {x: -2.53125, y: -1.6796875}
- {x: -2.4609375, y: -1.75}
- {x: -2.3984375, y: -1.796875}
- {x: -2.109375, y: -1.9375}
- {x: -1.9921875, y: -1.984375}
- {x: -1.8671875, y: -2.03125}
- {x: -1.65625, y: -2.078125}
- {x: -1.53125, y: -2.1171875}
- {x: -1.4609375, y: -2.125}
- {x: -1.40625, y: -2.1328125}
- {x: -1.140625, y: -2.1328125}
- {x: -0.953125, y: -2.1171875}
- {x: -0.6875, y: -2.109375}
- {x: -0.5859375, y: -2.1015625}
- {x: -0.4375, y: -2.1015625}
- {x: -0.21875, y: -2.140625}
- {x: -0.0859375, y: -2.1484375}
- {x: 0.0078125, y: -2.125}
- {x: 0.1015625, y: -2.0625}
- {x: 0.203125, y: -2.0703125}
- {x: 0.3359375, y: -2.1015625}
- {x: 0.4609375, y: -2.1640625}
- {x: 0.5078125, y: -2.1796875}
- {x: 0.5625, y: -2.1953125}
- {x: 0.6875, y: -2.1953125}
- {x: 0.796875, y: -2.1796875}
- {x: 1.0234375, y: -2.1328125}
- {x: 1.1328125, y: -2.1171875}
--- !u!50 &4079281900754592225
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6240296448730384320}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
...@@ -258,7 +258,7 @@ MonoBehaviour: ...@@ -258,7 +258,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
cooldown: 1 cooldown: 1
massIncrease: 30 massIncrease: 5
isStomping: 0 isStomping: 0
--- !u!114 &352228605 --- !u!114 &352228605
MonoBehaviour: MonoBehaviour:
......
...@@ -778,7 +778,7 @@ BoxCollider2D: ...@@ -778,7 +778,7 @@ BoxCollider2D:
m_SpriteTilingProperty: m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5} pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2, y: 2} oldSize: {x: 8, y: 8}
newSize: {x: 2, y: 2} newSize: {x: 2, y: 2}
adaptiveTilingThreshold: 0.5 adaptiveTilingThreshold: 0.5
drawMode: 0 drawMode: 0
...@@ -10561,7 +10561,7 @@ GameObject: ...@@ -10561,7 +10561,7 @@ GameObject:
type: 3} type: 3}
m_PrefabInstance: {fileID: 1738372363} m_PrefabInstance: {fileID: 1738372363}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &847607783 --- !u!114 &847607772
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -23755,7 +23755,7 @@ BoxCollider2D: ...@@ -23755,7 +23755,7 @@ BoxCollider2D:
m_SpriteTilingProperty: m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5} pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2, y: 2} oldSize: {x: 8, y: 8}
newSize: {x: 2, y: 2} newSize: {x: 2, y: 2}
adaptiveTilingThreshold: 0.5 adaptiveTilingThreshold: 0.5
drawMode: 0 drawMode: 0
......
...@@ -55,7 +55,7 @@ public class AI_WindAttack : WeightedAction ...@@ -55,7 +55,7 @@ public class AI_WindAttack : WeightedAction
public void Fire(Vector3 attackdir) public void Fire(Vector3 attackdir)
{ {
GameObject projectile = Instantiate(windAttack, transform.position + attackdir*2, Quaternion.AngleAxis(Mathf.Atan2(-attackdir.y, -attackdir.x) * Mathf.Rad2Deg + 180, Vector3.forward)); GameObject projectile = Instantiate(windAttack, transform.position + attackdir*2, Quaternion.AngleAxis(0, Vector3.forward));
projectile.GetComponent<AI_WindProjectile>().setValues(damage, destroyTime, thrust); projectile.GetComponent<AI_WindProjectile>().setValues(damage, destroyTime, thrust);
body = projectile.GetComponent<Rigidbody2D>(); body = projectile.GetComponent<Rigidbody2D>();
......
...@@ -14,6 +14,10 @@ public class AI_WindProjectile : MonoBehaviour ...@@ -14,6 +14,10 @@ public class AI_WindProjectile : MonoBehaviour
private void OnTriggerEnter2D(Collider2D other) private void OnTriggerEnter2D(Collider2D other)
{ {
if (other.CompareTag("EnemyShot"))
{
return;
}
if (other.CompareTag("Player")) if (other.CompareTag("Player"))
{ {
Vector2 dir = other.GetComponentInParent<Transform>().position - transform.position; Vector2 dir = other.GetComponentInParent<Transform>().position - transform.position;
......
...@@ -12,7 +12,7 @@ public class AI_FireProjectile : MonoBehaviour ...@@ -12,7 +12,7 @@ public class AI_FireProjectile : MonoBehaviour
private void OnTriggerEnter2D(Collider2D other) private void OnTriggerEnter2D(Collider2D other)
{ {
if (other.CompareTag("Fire")) if (other.CompareTag("Fire") || other.CompareTag("EnemyShot"))
{ {
return; return;
} }
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class SliderObject : MonoBehaviour namespace _Game.Scripts.Level_Hazards
{ {
private Rigidbody2D rb; public class SliderObject : MonoBehaviour
public float force;
/*private void OnTriggerEnter2D(Collider2D collision)
{ {
if (!GetComponent<Rigidbody2D>()) private Vector2 _position;
{ private Rigidbody2D _rigidbody2D;
rb = GetComponent<Rigidbody2D>();
} private void Start()