diff --git a/ProjektUnity/Assets/Scenes/TestScenes/Test_MarvinSchneider.unity b/ProjektUnity/Assets/Scenes/TestScenes/Test_MarvinSchneider.unity index 2f02ec0..5846134 100644 --- a/ProjektUnity/Assets/Scenes/TestScenes/Test_MarvinSchneider.unity +++ b/ProjektUnity/Assets/Scenes/TestScenes/Test_MarvinSchneider.unity @@ -123,6 +123,214 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &67435261 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 67435262} + - component: {fileID: 67435263} + m_Layer: 0 + m_Name: EnemyModel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &67435262 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67435261} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 444734234} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &67435263 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 67435261} + 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_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_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_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3} + m_Color: {r: 1, g: 0, b: 0, 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!1 &444734229 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 444734234} + - component: {fileID: 444734233} + - component: {fileID: 444734232} + - component: {fileID: 444734231} + - component: {fileID: 444734230} + m_Layer: 0 + m_Name: Enemy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &444734230 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 444734229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 58a007a46183a8947a29e53b7c347d41, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &444734231 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 444734229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 60acc7aa2e862ff488845c60a00d73cc, type: 3} + m_Name: + m_EditorClassIdentifier: + enemy: {fileID: 11400000, guid: 63df9f54516b18345ac5c46505bb7091, type: 2} + health: 0 +--- !u!50 &444734232 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 444734229} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!58 &444734233 +CircleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 444734229} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 0.5 +--- !u!4 &444734234 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 444734229} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.58, y: 3.49, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 67435262} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &780168302 stripped Transform: m_CorrespondingSourceObject: {fileID: 7799985602798067093, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} @@ -530,10 +738,26 @@ PrefabInstance: propertyPath: m_Name value: Player objectReference: {fileID: 0} + - target: {fileID: 705292598182815017, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} + propertyPath: m_Mass + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 705292598182815017, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} + propertyPath: m_GravityScale + value: 0 + objectReference: {fileID: 0} - target: {fileID: 788356621976524134, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} propertyPath: speed value: 1 objectReference: {fileID: 0} + - target: {fileID: 5584313292106778453, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5584313292106778453, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7799985602798067093, guid: f25706fcb77adb246a6a86fbe829a8f3, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -586,3 +810,4 @@ SceneRoots: - {fileID: 1055048549} - {fileID: 878561087} - {fileID: 1432196631} + - {fileID: 444734234} diff --git a/ProjektUnity/Assets/ScriptableObjects.meta b/ProjektUnity/Assets/ScriptableObjects.meta new file mode 100644 index 0000000..22837ac --- /dev/null +++ b/ProjektUnity/Assets/ScriptableObjects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26e2d8edd3421694dad52050e1440794 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/ScriptableObjects/Enemy.meta b/ProjektUnity/Assets/ScriptableObjects/Enemy.meta new file mode 100644 index 0000000..00c6cce --- /dev/null +++ b/ProjektUnity/Assets/ScriptableObjects/Enemy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3258b2da59af1349929e0899ac4a041 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset b/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset new file mode 100644 index 0000000..8c2d7ce --- /dev/null +++ b/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5821715bcd7665849b2215accab5515c, type: 3} + m_Name: CircleEnemy + m_EditorClassIdentifier: + health: 100 diff --git a/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset.meta b/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset.meta new file mode 100644 index 0000000..b0418e8 --- /dev/null +++ b/ProjektUnity/Assets/ScriptableObjects/Enemy/CircleEnemy.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63df9f54516b18345ac5c46505bb7091 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/Enemy.meta b/ProjektUnity/Assets/Scripts/Enemy.meta new file mode 100644 index 0000000..8c1abbc --- /dev/null +++ b/ProjektUnity/Assets/Scripts/Enemy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 07c8bd3239672f64fb54403105c7762a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs b/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs new file mode 100644 index 0000000..c136ad2 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class EnemyMovement : MonoBehaviour +{ + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs.meta b/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs.meta new file mode 100644 index 0000000..1a026f2 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/Enemy/EnemyMovement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58a007a46183a8947a29e53b7c347d41 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs b/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs new file mode 100644 index 0000000..6ad6590 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class EnemyStats : MonoBehaviour +{ + public Enemy enemy; + public float health = 0; + public float speed = 0; + + private void Start() { + health = enemy.currentHealth; + speed = enemy.currentSpeed; + } + + //Für Später + /* private void OnCollisionEnter2D(Collision2D other) { + if (other.gameObject.CompareTag("Sword") || other.gameObject.CompareTag("Bullet")){ + + } + } */ +} diff --git a/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs.meta b/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs.meta new file mode 100644 index 0000000..6e15376 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/Enemy/EnemyStats.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 60acc7aa2e862ff488845c60a00d73cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/Player/PlayerMover.cs b/ProjektUnity/Assets/Scripts/Player/PlayerMover.cs index d0d8eff..c0ef262 100644 --- a/ProjektUnity/Assets/Scripts/Player/PlayerMover.cs +++ b/ProjektUnity/Assets/Scripts/Player/PlayerMover.cs @@ -9,6 +9,8 @@ public class PlayerMover : MonoBehaviour public KeyCode left = KeyCode.A; public KeyCode right = KeyCode.D; + + public Rigidbody2D rb; public float speed = 2f; @@ -16,7 +18,6 @@ public class PlayerMover : MonoBehaviour void Start() { rb = GetComponent(); - rb.gravityScale = 0; } // Update is called once per frame diff --git a/ProjektUnity/Assets/Scripts/ScriptableObjects.meta b/ProjektUnity/Assets/Scripts/ScriptableObjects.meta new file mode 100644 index 0000000..8c3ad50 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/ScriptableObjects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3906820bf94720c438c682389cd1b117 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy.meta b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy.meta new file mode 100644 index 0000000..75445e5 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf0aff90b569ed8489efa151fdd3793f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs new file mode 100644 index 0000000..e093725 --- /dev/null +++ b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[CreateAssetMenu(fileName = "Enemy", menuName = "Enemy/Enemy", order = 0)] +public class Enemy : ScriptableObject +{ + [HideInInspector] + public float currentHealth = 0; + + [SerializeField] + private float health = 100; + public float currentSpeed = 0; + + private void Start() { + currentHealth = health; + } +} diff --git a/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs.meta b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs.meta new file mode 100644 index 0000000..2bfaf6e --- /dev/null +++ b/ProjektUnity/Assets/Scripts/ScriptableObjects/Enemy/Enemy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5821715bcd7665849b2215accab5515c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~1c9446670d1d45c4db084397a2234ed9~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~1c9446670d1d45c4db084397a2234ed9~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~571a4b13e58e3f94a935c15d54c2357f~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~571a4b13e58e3f94a935c15d54c2357f~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~65097b652a4f34a458404e71f9039c36~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~65097b652a4f34a458404e71f9039c36~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~7d9e2d8036933fe4786a3773c46924e4~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~7d9e2d8036933fe4786a3773c46924e4~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~a07761d630bb63c40971c4aa71882621~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~a07761d630bb63c40971c4aa71882621~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~a55cca6c58a00d64aae9f4095fe8120d~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~a55cca6c58a00d64aae9f4095fe8120d~ new file mode 100644 index 0000000..e69de29 diff --git a/ProjektUnity/Assets/~UnityDirMonSyncFile~c939832e89a45824f9db84949f2c3f91~ b/ProjektUnity/Assets/~UnityDirMonSyncFile~c939832e89a45824f9db84949f2c3f91~ new file mode 100644 index 0000000..e69de29