Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mihálik
NPGR038
Commits
d52edaf6
Commit
d52edaf6
authored
Sep 14, 2021
by
Martin Mihálik
🔥
Browse files
Rubble Collection
parent
3b58ac64
Changes
10
Hide whitespace changes
Inline
Side-by-side
Don't Be Afraid To Fall/Assets/Prefabs/Explosion.prefab
View file @
d52edaf6
...
...
@@ -12,7 +12,7 @@ GameObject:
-
component
:
{
fileID
:
9034781248440383825
}
-
component
:
{
fileID
:
9034781248440383854
}
-
component
:
{
fileID
:
9034781248440383855
}
m_Layer
:
0
m_Layer
:
1
0
m_Name
:
Explosion
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
...
...
Don't Be Afraid To Fall/Assets/Prefabs/Rubble.prefab
View file @
d52edaf6
...
...
@@ -28,7 +28,7 @@ Transform:
m_GameObject
:
{
fileID
:
4362927315812235910
}
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_LocalScale
:
{
x
:
0.5
,
y
:
0.5
,
z
:
1
}
m_Children
:
-
{
fileID
:
4362927315981378692
}
m_Father
:
{
fileID
:
0
}
...
...
@@ -151,7 +151,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
4362927315981378692
}
-
component
:
{
fileID
:
4362927315981378691
}
-
component
:
{
fileID
:
4
362927315981378690
}
-
component
:
{
fileID
:
4
813060266174081651
}
m_Layer
:
8
m_Name
:
Collectible
m_TagString
:
Untagged
...
...
@@ -189,7 +189,7 @@ CircleCollider2D:
m_Offset
:
{
x
:
0.05
,
y
:
0
}
serializedVersion
:
2
m_Radius
:
0.15
---
!u!114
&4
362927315981378690
---
!u!114
&4
813060266174081651
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
...
...
@@ -198,6 +198,6 @@ MonoBehaviour:
m_GameObject
:
{
fileID
:
4362927315981378693
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
610be74bcb2e1de4395cf0c601fe712d
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f03e8aa737f82ea44a8696969ccc24b7
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
Don't Be Afraid To Fall/Assets/Scenes/Level.unity
View file @
d52edaf6
...
...
@@ -137,6 +137,7 @@ GameObject:
-
component
:
{
fileID
:
512397501
}
-
component
:
{
fileID
:
512397505
}
-
component
:
{
fileID
:
512397506
}
-
component
:
{
fileID
:
512397507
}
m_Layer
:
7
m_Name
:
Player
m_TagString
:
Untagged
...
...
@@ -298,6 +299,18 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
384f8f188b664b745bc1f34d36ce528e
,
type
:
3
}
m_Name
:
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
GameObject
:
m_ObjectHideFlags
:
0
...
...
Don't Be Afraid To Fall/Assets/Scripts/Rubble.meta
0 → 100644
View file @
d52edaf6
fileFormatVersion: 2
guid: b00ecd094bb2a6b4d8a838457bcb1925
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Don't Be Afraid To Fall/Assets/Scripts/Rubble/RubbleCollectible.cs
0 → 100644
View file @
d52edaf6
using
UnityEngine
;
public
class
RubbleCollectible
:
MonoBehaviour
{
private
void
OnTriggerEnter2D
(
Collider2D
collision
)
{
if
(
collision
.
gameObject
.
GetComponent
<
RubbleCollector
>()
!=
null
)
{
Destroy
(
gameObject
.
transform
.
parent
.
gameObject
);
}
}
}
Don't Be Afraid To Fall/Assets/Scripts/Rubble/RubbleCollectible.cs.meta
0 → 100644
View file @
d52edaf6
fileFormatVersion: 2
guid: f03e8aa737f82ea44a8696969ccc24b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Don't Be Afraid To Fall/Assets/Scripts/Rubble/RubbleCollector.cs
0 → 100644
View file @
d52edaf6
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
;
}
}
}
Don't Be Afraid To Fall/Assets/Scripts/Rubble/RubbleCollector.cs.meta
0 → 100644
View file @
d52edaf6
fileFormatVersion: 2
guid: 00d89d77021225147b7c047536cdfad8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Don't Be Afraid To Fall/ProjectSettings/Physics2DSettings.asset
View file @
d52edaf6
...
...
@@ -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
:
ffffffff
ffffffffffffffffffffffffffffffffffffffff7ffdff
ff
b
ff
f
fffffff
d
fff
fb
ff
e
ff
ffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix
:
ffffffff
01f8ffff01f8ffffc1feffff01f8ffff01f8
ffff
09f8
ffff
09
ffffff
81f8
ffff
89f8ffff89f8
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Don't Be Afraid To Fall/ProjectSettings/TagManager.asset
View file @
d52edaf6
...
...
@@ -15,7 +15,7 @@ TagManager:
-
Player
-
Collectible
-
Meteor
-
-
Explosion
-
-
-
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment