Commit d52edaf6 authored by Martin Mihálik's avatar Martin Mihálik 🔥
Browse files

Rubble Collection

parent 3b58ac64
...@@ -12,7 +12,7 @@ GameObject: ...@@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 9034781248440383825} - component: {fileID: 9034781248440383825}
- component: {fileID: 9034781248440383854} - component: {fileID: 9034781248440383854}
- component: {fileID: 9034781248440383855} - component: {fileID: 9034781248440383855}
m_Layer: 0 m_Layer: 10
m_Name: Explosion m_Name: Explosion
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
......
...@@ -28,7 +28,7 @@ Transform: ...@@ -28,7 +28,7 @@ Transform:
m_GameObject: {fileID: 4362927315812235910} m_GameObject: {fileID: 4362927315812235910}
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: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: m_Children:
- {fileID: 4362927315981378692} - {fileID: 4362927315981378692}
m_Father: {fileID: 0} m_Father: {fileID: 0}
...@@ -151,7 +151,7 @@ GameObject: ...@@ -151,7 +151,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 4362927315981378692} - component: {fileID: 4362927315981378692}
- component: {fileID: 4362927315981378691} - component: {fileID: 4362927315981378691}
- component: {fileID: 4362927315981378690} - component: {fileID: 4813060266174081651}
m_Layer: 8 m_Layer: 8
m_Name: Collectible m_Name: Collectible
m_TagString: Untagged m_TagString: Untagged
...@@ -189,7 +189,7 @@ CircleCollider2D: ...@@ -189,7 +189,7 @@ CircleCollider2D:
m_Offset: {x: 0.05, y: 0} m_Offset: {x: 0.05, y: 0}
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.15 m_Radius: 0.15
--- !u!114 &4362927315981378690 --- !u!114 &4813060266174081651
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -198,6 +198,6 @@ MonoBehaviour: ...@@ -198,6 +198,6 @@ MonoBehaviour:
m_GameObject: {fileID: 4362927315981378693} m_GameObject: {fileID: 4362927315981378693}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 610be74bcb2e1de4395cf0c601fe712d, type: 3} m_Script: {fileID: 11500000, guid: f03e8aa737f82ea44a8696969ccc24b7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
...@@ -137,6 +137,7 @@ GameObject: ...@@ -137,6 +137,7 @@ GameObject:
- component: {fileID: 512397501} - component: {fileID: 512397501}
- component: {fileID: 512397505} - component: {fileID: 512397505}
- component: {fileID: 512397506} - component: {fileID: 512397506}
- component: {fileID: 512397507}
m_Layer: 7 m_Layer: 7
m_Name: Player m_Name: Player
m_TagString: Untagged m_TagString: Untagged
...@@ -298,6 +299,18 @@ MonoBehaviour: ...@@ -298,6 +299,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 384f8f188b664b745bc1f34d36ce528e, type: 3} m_Script: {fileID: 11500000, guid: 384f8f188b664b745bc1f34d36ce528e, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!114 &512397507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 512397500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 00d89d77021225147b7c047536cdfad8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &519420028 --- !u!1 &519420028
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
fileFormatVersion: 2
guid: b00ecd094bb2a6b4d8a838457bcb1925
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
public class RubbleCollectible : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.GetComponent<RubbleCollector>() != null)
{
Destroy(gameObject.transform.parent.gameObject);
}
}
}
fileFormatVersion: 2
guid: f03e8aa737f82ea44a8696969ccc24b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
public class RubbleCollector : MonoBehaviour
{
public uint Pieces { get; private set; }
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.GetComponent<RubbleCollectible>() != null)
{
Pieces += 1;
}
}
}
fileFormatVersion: 2
guid: 00d89d77021225147b7c047536cdfad8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -53,4 +53,4 @@ Physics2DSettings: ...@@ -53,4 +53,4 @@ Physics2DSettings:
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 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_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffff7ffdffffbffffffffffdffffbffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_LayerCollisionMatrix: ffffffff01f8ffff01f8ffffc1feffff01f8ffff01f8ffff09f8ffff09ffffff81f8ffff89f8ffff89f8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
...@@ -15,7 +15,7 @@ TagManager: ...@@ -15,7 +15,7 @@ TagManager:
- Player - Player
- Collectible - Collectible
- Meteor - Meteor
- - Explosion
- -
- -
- -
......
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