Muzzle Particle added(funktioniert auch)

This commit is contained in:
klikev 2024-07-02 18:23:10 +02:00
parent df37d14120
commit e85036bb28
9 changed files with 5045 additions and 67 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6a4717710cba41747afb9065c27714ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0d96e9e78ab544a4a98b8af026c4d9de
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -28,7 +28,8 @@ Transform:
m_LocalPosition: {x: 0.5, y: 0, z: 0} m_LocalPosition: {x: 0.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
- {fileID: 686265786403669914}
m_Father: {fileID: 6798321073873421098} m_Father: {fileID: 6798321073873421098}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6867957792503530889 --- !u!1 &6867957792503530889
@ -146,7 +147,7 @@ MeshRenderer:
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 2100000, guid: 96c064c927fe3d141af64533fcb30b5d, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -236,7 +237,82 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f0262bbe3025ed14984b9ca540206237, type: 3} m_Script: {fileID: 11500000, guid: f0262bbe3025ed14984b9ca540206237, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
muzzle: {fileID: 0}
spawnpoint: {fileID: 3929927056536112425} spawnpoint: {fileID: 3929927056536112425}
bullet: {fileID: 939049122039926632, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3} bullet: {fileID: 939049122039926632, guid: 5bd04146a95212e41bc2c52b7079e131, type: 3}
dataBullet: {fileID: 11400000, guid: cafd241bae342f446ae8141cc5d72daf, type: 2} dataBullet: {fileID: 11400000, guid: cafd241bae342f446ae8141cc5d72daf, type: 2}
reloadTime: 3 reloadTime: 3
--- !u!1001 &5945913481014272002
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2326864918050230340}
m_Modifications:
- target: {fileID: 430484790216468074, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: stopAction
value: 1
objectReference: {fileID: 0}
- target: {fileID: 430484790216468074, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: LightsModule.light
value:
objectReference: {fileID: 3050412642343233004, guid: ecc11f2cd73840b43ac860dbd8067281, type: 3}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.70710677
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071067
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8077938284314862731, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_Name
value: MuzzleParticalSystem
objectReference: {fileID: 0}
- target: {fileID: 8077938284314862731, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
--- !u!4 &686265786403669914 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6557869798269101976, guid: 0d96e9e78ab544a4a98b8af026c4d9de, type: 3}
m_PrefabInstance: {fileID: 5945913481014272002}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3af1501058f211d4bbb6c5d51eec16d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,96 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3461103454940669618
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6273052463911473214}
- component: {fileID: 3050412642343233004}
m_Layer: 0
m_Name: Point Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6273052463911473214
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3461103454940669618}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1.497, y: -9.070001, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &3050412642343233004
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3461103454940669618}
m_Enabled: 1
serializedVersion: 10
m_Type: 2
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 1.02e-43, y: 1.37e-43, z: 5.69e-42, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ecc11f2cd73840b43ac860dbd8067281
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -1664,7 +1664,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!108 &1827603664 --- !u!108 &1827603664
Light: Light:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1735,13 +1735,13 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1827603663} m_GameObject: {fileID: 1827603663}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalRotation: {x: -0.5553874, y: -0.24068488, z: 0.43792647, w: -0.6647075}
m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalPosition: {x: 1.36, y: 8.65, z: 0.87}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 71.649, y: 328.08, z: -90.085}
--- !u!1001 &1201908208995785475 --- !u!1001 &1201908208995785475
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1799,63 +1799,6 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3} m_SourcePrefab: {fileID: 100100000, guid: abb3f2146f967be4e9dfd6069915f42c, type: 3}
--- !u!1001 &1544909526857362950
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 380174200671927273, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_Name
value: ClashPartical
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.x
value: 1.497
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.w
value: -0.30019215
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.x
value: 0.40807855
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.y
value: 0.58593726
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalRotation.z
value: 0.6324825
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 279.53198
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -263.167
objectReference: {fileID: 0}
- target: {fileID: 5064384315330415458, guid: f063995f35533054d8f370458ee30f57, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 143.506
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f063995f35533054d8f370458ee30f57, type: 3}
--- !u!1001 &2143748980832870478 --- !u!1001 &2143748980832870478
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1921,7 +1864,6 @@ SceneRoots:
- {fileID: 1475365810} - {fileID: 1475365810}
- {fileID: 1211352543} - {fileID: 1211352543}
- {fileID: 1134786306} - {fileID: 1134786306}
- {fileID: 1544909526857362950}
- {fileID: 1062964501} - {fileID: 1062964501}
- {fileID: 675150774} - {fileID: 675150774}
- {fileID: 1513164528} - {fileID: 1513164528}

View File

@ -4,7 +4,7 @@ using UnityEngine;
public class WeaponScript : MonoBehaviour public class WeaponScript : MonoBehaviour
{ {
public ParticleSystem muzzle;
public GameObject spawnpoint; public GameObject spawnpoint;
public GameObject bullet; public GameObject bullet;
@ -32,6 +32,8 @@ public class WeaponScript : MonoBehaviour
public void shoot(){ public void shoot(){
if(ammo != 0){ if(ammo != 0){
if(Input.GetKeyDown(KeyCode.Mouse0)){ if(Input.GetKeyDown(KeyCode.Mouse0)){
muzzle.gameObject.SetActive(true);
//muzzle.Play();
Instantiate(bullet,spawnpoint.transform.position,transform.rotation); Instantiate(bullet,spawnpoint.transform.position,transform.rotation);
ammo--; ammo--;
} }
@ -43,8 +45,8 @@ public class WeaponScript : MonoBehaviour
} }
void Start() void Start()
{ {
dataBullet = GetComponentInChildren<DataBullet>();
ammo = dataBullet.ammo; ammo = dataBullet.ammo;
muzzle = spawnpoint.GetComponentInChildren<ParticleSystem>();
} }
// Update is called once per frame // Update is called once per frame