Commit 9f012f10 authored by Christopher Benes's avatar Christopher Benes

Merge branch 'master' of gitlab.fsi.hochschule-trier.de:GameDevWeek/ws-18_19/unity/suck-it

parents f3f31acf 931bc53c
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Erd-Gegner
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107546017030560142}
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 &1102715565506728240
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Erde_Idle
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: faf51c983898676459e254664d72dca2, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107546017030560142
AnimatorStateMachine:
serializedVersion: 5
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: 1102715565506728240}
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: 1102715565506728240}
fileFormatVersion: 2
guid: 1755e5c46f3b22b4f9b61488d91a6bec
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
%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: Erde_Idle
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: ab90e10760739384db3d82c49c699e73, type: 3}
- time: 0.625
value: {fileID: 21300000, guid: 4dd545c3842cf7a4588b944636777d33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 8
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: ab90e10760739384db3d82c49c699e73, type: 3}
- {fileID: 21300000, guid: 4dd545c3842cf7a4588b944636777d33, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.75
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: faf51c983898676459e254664d72dca2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4dd545c3842cf7a4588b944636777d33
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1024
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
...@@ -85,6 +85,7 @@ GameObject: ...@@ -85,6 +85,7 @@ GameObject:
- component: {fileID: 9019467100873254385} - component: {fileID: 9019467100873254385}
- component: {fileID: 2042442276950806442} - component: {fileID: 2042442276950806442}
- component: {fileID: 1329814112} - component: {fileID: 1329814112}
- component: {fileID: 4207916864558529994}
m_Layer: 14 m_Layer: 14
m_Name: Erd-Gegner m_Name: Erd-Gegner
m_TagString: Earth m_TagString: Earth
...@@ -245,6 +246,25 @@ MonoBehaviour: ...@@ -245,6 +246,25 @@ MonoBehaviour:
speed: 5 speed: 5
distance: 2 distance: 2
groundDetection: {fileID: 1377908511} groundDetection: {fileID: 1377908511}
--- !u!95 &4207916864558529994
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1634356314439590}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 1755e5c46f3b22b4f9b61488d91a6bec, 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!1 &7480494801806484534 --- !u!1 &7480494801806484534
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -274,7 +274,7 @@ Transform: ...@@ -274,7 +274,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8757578769013443562} m_GameObject: {fileID: 8757578769013443562}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.253, y: -0.309, z: 0} m_LocalPosition: {x: 0.117, y: -0.302, z: 0}
m_LocalScale: {x: 0.3846154, y: 0.3846154, z: 0.3846154} m_LocalScale: {x: 0.3846154, y: 0.3846154, z: 0.3846154}
m_Children: [] m_Children: []
m_Father: {fileID: 4738352637052488} m_Father: {fileID: 4738352637052488}
......
...@@ -14,9 +14,9 @@ GameObject: ...@@ -14,9 +14,9 @@ GameObject:
- component: {fileID: 7928429373142515012} - component: {fileID: 7928429373142515012}
- component: {fileID: 8237559276284760939} - component: {fileID: 8237559276284760939}
- component: {fileID: 5473739827322462943} - component: {fileID: 5473739827322462943}
m_Layer: 12 m_Layer: 0
m_Name: Enemy_WaterAttack m_Name: Enemy_WaterAttack
m_TagString: Water m_TagString: EnemyShot
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
...@@ -29,7 +29,7 @@ Transform: ...@@ -29,7 +29,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7588789901055592565} m_GameObject: {fileID: 7588789901055592565}
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, z: 0} m_LocalPosition: {x: 0, y: 0, z: -1}
m_LocalScale: {x: 6, y: 6, z: 1} m_LocalScale: {x: 6, y: 6, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
...@@ -95,7 +95,7 @@ Rigidbody2D: ...@@ -95,7 +95,7 @@ Rigidbody2D:
m_Simulated: 1 m_Simulated: 1
m_UseFullKinematicContacts: 0 m_UseFullKinematicContacts: 0
m_UseAutoMass: 0 m_UseAutoMass: 0
m_Mass: 1 m_Mass: 3
m_LinearDrag: 0 m_LinearDrag: 0
m_AngularDrag: 0.05 m_AngularDrag: 0.05
m_GravityScale: 3 m_GravityScale: 3
...@@ -133,7 +133,7 @@ CapsuleCollider2D: ...@@ -133,7 +133,7 @@ CapsuleCollider2D:
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_IsTrigger: 0 m_IsTrigger: 1
m_UsedByEffector: 0 m_UsedByEffector: 0
m_UsedByComposite: 0 m_UsedByComposite: 0
m_Offset: {x: -0.008341174, y: -0.00032437945} m_Offset: {x: -0.008341174, y: -0.00032437945}
......
...@@ -23276,7 +23276,7 @@ PrefabInstance: ...@@ -23276,7 +23276,7 @@ PrefabInstance:
type: 3} type: 3}
propertyPath: button propertyPath: button
value: value:
objectReference: {fileID: 1858996996} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3ff4cf871f5edaa40b0530c80a9ff9df, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 3ff4cf871f5edaa40b0530c80a9ff9df, type: 3}
--- !u!1 &1373053034 --- !u!1 &1373053034
...@@ -32640,12 +32640,12 @@ PrefabInstance: ...@@ -32640,12 +32640,12 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332, - target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -39.7 value: 31.43
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332, - target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 51.5 value: 17.98
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332, - target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3} type: 3}
...@@ -32695,7 +32695,7 @@ PrefabInstance: ...@@ -32695,7 +32695,7 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332, - target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3} type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 0.4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 52145075018362291, guid: 2e3528907311e438dab0d393127aa332, - target: {fileID: 52145075018362291, guid: 2e3528907311e438dab0d393127aa332,
type: 3} type: 3}
...@@ -32864,6 +32864,15 @@ PrefabInstance: ...@@ -32864,6 +32864,15 @@ PrefabInstance:
propertyPath: LostLife.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName propertyPath: LostLife.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 130221827, guid: 2e3528907311e438dab0d393127aa332, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4604151598474065536, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2e3528907311e438dab0d393127aa332, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 2e3528907311e438dab0d393127aa332, type: 3}
--- !u!4 &1741470320 stripped --- !u!4 &1741470320 stripped
...@@ -34650,18 +34659,6 @@ PrefabInstance: ...@@ -34650,18 +34659,6 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 49ad5eee708571d449789cb994b54fcb, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
--- !u!114 &1858996996 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5970381992757526481, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
m_PrefabInstance: {fileID: 1777049076}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1864783512 --- !u!1001 &1864783512
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -66,14 +66,9 @@ public class AI_WaterAttack : WeightedAction ...@@ -66,14 +66,9 @@ public class AI_WaterAttack : WeightedAction
launchPower += 3; launchPower += 3;
GameObject projectile = Instantiate(fireBall, shotspawn.position, shotspawn.rotation); GameObject projectile = Instantiate(fireBall, shotspawn.position, shotspawn.rotation);
projectile.GetComponent<AI_WaterProjectile>().setValues(damage, destroyTime, thrust); projectile.GetComponent<AI_WaterProjectile>().setValues(damage, destroyTime, thrust);
if (player.transform.position.x > this.transform.position.x) Vector3 dir = player.transform.position - projectile.transform.position;
{ dir.Normalize();
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(launchPower, launchPower / 2); projectile.GetComponent<Rigidbody2D>().velocity = dir * launchPower;
}
else
{
projectile.GetComponent<Rigidbody2D>().velocity = new Vector2(-launchPower, launchPower / 2);
}
yield return new WaitForSeconds(attackSpeed); yield return new WaitForSeconds(attackSpeed);
} }
} }
......
...@@ -13,10 +13,7 @@ public class AI_WaterProjectile : MonoBehaviour ...@@ -13,10 +13,7 @@ public class AI_WaterProjectile : MonoBehaviour
private void OnTriggerEnter2D(Collider2D other) private void OnTriggerEnter2D(Collider2D other)
{ {
if (other.CompareTag("EnemyShot") || other.gameObject.layer == LayerMask.NameToLayer("Ground") || other.gameObject.layer == LayerMask.NameToLayer("Enemy")) print(other.name);
{
return;
}
if (other.CompareTag("Player")) if (other.CompareTag("Player"))
{ {
Vector2 dir = new Vector2(other.GetComponentInParent<Transform>().position.x - transform.position.x, 0); Vector2 dir = new Vector2(other.GetComponentInParent<Transform>().position.x - transform.position.x, 0);
...@@ -25,8 +22,7 @@ public class AI_WaterProjectile : MonoBehaviour ...@@ -25,8 +22,7 @@ public class AI_WaterProjectile : MonoBehaviour
other.attachedRigidbody.AddForce(dir, ForceMode2D.Impulse); other.attachedRigidbody.AddForce(dir, ForceMode2D.Impulse);
other.GetComponentInParent<Life>().Damage(damage); other.GetComponentInParent<Life>().Damage(damage);
} }
Debug.Log("test"); if(other.gameObject.layer == LayerMask.NameToLayer("Ground") || other.CompareTag("EnemyShot")) Destroy();
Destroy();
} }
public void setValues(int damage, float destroyTime, float thrust) public void setValues(int damage, float destroyTime, float thrust)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment