Compare commits
2 Commits
a3adc77777
...
04fe6f1987
Author | SHA1 | Date | |
---|---|---|---|
|
04fe6f1987 | ||
|
4ca5d3db4f |
@ -365,6 +365,14 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 5950832400214244271}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5727695039551963900, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 357
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5727695039551963900, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 209
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5863193481701293955, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
@ -409,6 +417,14 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: UI_Manager
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8625755030761962559, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 458
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8625755030761962559, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 179
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
@ -10,7 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 601926406646660137}
|
||||
- component: {fileID: 5420977559640316239}
|
||||
m_Layer: 0
|
||||
m_Layer: 9
|
||||
m_Name: Trail
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -157,7 +157,7 @@ GameObject:
|
||||
- component: {fileID: 7689678004430099734}
|
||||
- component: {fileID: 878037186990386657}
|
||||
- component: {fileID: 5994619817623951055}
|
||||
m_Layer: 0
|
||||
m_Layer: 9
|
||||
m_Name: Bullet
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -257,7 +257,7 @@ GameObject:
|
||||
- component: {fileID: 2783922791344706728}
|
||||
- component: {fileID: 3511214472677508059}
|
||||
- component: {fileID: 1974950874428390090}
|
||||
m_Layer: 0
|
||||
m_Layer: 9
|
||||
m_Name: BulletMesh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
@ -1384,9 +1384,77 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 423185948905945774, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 666296827679288680, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1409017717971667579, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3230210169410262755, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3391868011099319290, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Player (1)
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3391868011099319290, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3601559577021101208, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4093775944364614034, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.55560887
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.403
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.60068274
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: -0.6547129
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.042114396
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.753147
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.048446175
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 1.022
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 262.066
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4163468239720933169, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 7.29
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4231050703702953731, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@ -1428,8 +1496,78 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
- target: {fileID: 4731377471211230426, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4972354890819608722, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5245801164585615012, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5842865707223673138, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5846198897390256284, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6608350815154232110, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.06001303
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.68006015
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.1801692
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8477437862324887214, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8948127678283011642, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5245801164585615012, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 4093775944364614034, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: abab2a81048fcb64ab6d31bc6bc8f529, type: 3}
|
||||
|
@ -42,7 +42,7 @@ public class BulletScript : MonoBehaviour
|
||||
/// clashPartical spawned clashPartical am EinschlagPunkt der Kugel.
|
||||
/// </summary>
|
||||
/// <param name="collision">Die Collision mit der Bullet.</param>
|
||||
public void clashPartcal(Collision collision){
|
||||
public void clashParticle(Collision collision){
|
||||
ContactPoint contact = collision.GetContact(0);
|
||||
Instantiate(particalClash,transform.position,Quaternion.LookRotation(contact.normal));
|
||||
}
|
||||
@ -53,9 +53,9 @@ public class BulletScript : MonoBehaviour
|
||||
private void OnCollisionEnter(Collision collision){
|
||||
Debug.Log(collision.gameObject.name + " UND HIER IST DER TAG: " + collision.gameObject.tag);
|
||||
if(collision.transform.tag == "Enemy"){
|
||||
collision.transform.GetComponent<Enemy>().takeDamage(damage);
|
||||
collision.transform.GetComponent<EnemyHealth>().takeDamage(damage);
|
||||
}
|
||||
clashPartcal(collision);
|
||||
clashParticle(collision);
|
||||
GameObject.Destroy(this.gameObject);
|
||||
|
||||
}
|
||||
@ -68,6 +68,8 @@ public class BulletScript : MonoBehaviour
|
||||
|
||||
rb = this.GetComponent<Rigidbody>();
|
||||
|
||||
Physics.IgnoreCollision(GetComponent<Collider>(),GameObject.Find("Player").GetComponent<Collider>());
|
||||
|
||||
|
||||
|
||||
ray = Camera.main.ViewportPointToRay(new Vector3(0.5f,0.5f,0f));
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class Enemy : MonoBehaviour
|
||||
public class EnemyHealth : MonoBehaviour
|
||||
{
|
||||
private int score = 1;
|
||||
private bool alive = true;
|
@ -2,7 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ParticalClash : MonoBehaviour
|
||||
public class ParticleClash : MonoBehaviour
|
||||
{
|
||||
|
||||
public float lifeTime = 2;
|
@ -17,8 +17,8 @@ TagManager:
|
||||
- Ground
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Bullets
|
||||
- Player
|
||||
-
|
||||
-
|
||||
-
|
||||
|
Loading…
Reference in New Issue
Block a user