Commit 21644dbe authored by Marcel's avatar Marcel
Browse files

Made Script for BY Ability destroyable Objects and edited Layers and Prefabs of Abilitys

parent 88f508ae
......@@ -12,10 +12,10 @@ GameObject:
- component: {fileID: 6245540174503209973}
- component: {fileID: 5781967143616988328}
- component: {fileID: 1168152351263728623}
- component: {fileID: 7637985616803130080}
- component: {fileID: 4139217964488843345}
m_Layer: 12
m_Name: BurnableObject
m_TagString: Untagged
m_TagString: Burnable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -129,7 +129,7 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &7637985616803130080
--- !u!114 &4139217964488843345
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -138,6 +138,6 @@ MonoBehaviour:
m_GameObject: {fileID: 6261656428157832302}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 554f5796680843b4db36a7aacfb506fa, type: 3}
m_Script: {fileID: 11500000, guid: 21b297fb8275aa94cb79f9b2d3820c1a, type: 3}
m_Name:
m_EditorClassIdentifier:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8614965419928718691
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 600150546530394050}
- component: {fileID: 771630844987649290}
- component: {fileID: 7208544238975838918}
- component: {fileID: 6220141943495021721}
- component: {fileID: 8756059491135033755}
m_Layer: 12
m_Name: ExplosivableObject
m_TagString: Explosivable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &600150546530394050
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8614965419928718691}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.9257363, y: 1.7465343, z: 0.08203125}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &771630844987649290
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8614965419928718691}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
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_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
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: 21300000, guid: ac2e2a099bb929d43812d38cb59e3f81, type: 3}
m_Color: {r: 1, g: 1, b: 1, 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!50 &7208544238975838918
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8614965419928718691}
m_BodyType: 1
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
--- !u!61 &6220141943495021721
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8614965419928718691}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!114 &8756059491135033755
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8614965419928718691}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 21b297fb8275aa94cb79f9b2d3820c1a, type: 3}
m_Name:
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: f5369aa9bc176af488d88ba32406afa2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -12,9 +12,9 @@ GameObject:
- component: {fileID: 967038370172742350}
- component: {fileID: 4980288968761876959}
- component: {fileID: 8935424848761574170}
m_Layer: 0
m_Layer: 13
m_Name: Bomb
m_TagString: Untagged
m_TagString: Bomb
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......
......@@ -12,9 +12,9 @@ GameObject:
- component: {fileID: 8475344232927896200}
- component: {fileID: 8475344232927896203}
- component: {fileID: 8475344232927896206}
m_Layer: 0
m_Layer: 13
m_Name: Fireball
m_TagString: Untagged
m_TagString: Fire
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ByAbilityDestroyableObject : MonoBehaviour,IKillTarget
{
// Start is called before the first frame update
public void Die(GameObject other)
{
Transform thisGameObject = gameObject.transform;
if (gameObject.CompareTag("Burnable") && thisGameObject.CompareTag("Fire"))
{
Destroy(thisGameObject.gameObject);
}
else if (gameObject.CompareTag("Explosivable")&&thisGameObject.CompareTag("Bomb"))
{
Destroy(thisGameObject.gameObject);
}
}
}
fileFormatVersion: 2
guid: 21b297fb8275aa94cb79f9b2d3820c1a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,7 +15,7 @@ GameObject:
- component: {fileID: 4114919522646481440}
- component: {fileID: 4114919522646481455}
- component: {fileID: 4114919522646481444}
m_Layer: 0
m_Layer: 10
m_Name: DestroyableTilemap
m_TagString: Untagged
m_Icon: {fileID: 0}
......
......@@ -53,4 +53,4 @@ Physics2DSettings:
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
m_LayerCollisionMatrix: ffc7ffffc9c0ffffc9c0ffffffffffffc9c0ffffc9c0ffffffffffffffffffffc9c0ffffc9ccffffc9c6ffffc8c2ffffc8c0ffffc8c0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix: fff7ffffc9c0ffffc9c0ffffffffffffc9c0ffffc9c0ffffffffffffffffffffc9c0ffffc9dcffffc9c6ffffc8c2ffffc9f2ffffc9d0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
......@@ -7,6 +7,10 @@ TagManager:
- Ground
- Group
- GameManager
- Burnable
- Fire
- Explosivable
- Bomb
layers:
- Default
- TransparentFX
......@@ -20,8 +24,8 @@ TagManager:
- Player
- InteractibaleObject
- Elevator
- BurnableObject
- ExplosableObject
- ByAbilityDestroyableObject
- AbilityObject
-
-
-
......
Supports Markdown
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