Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Birb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gadig
Birb
Commits
c2f1d8b9
Commit
c2f1d8b9
authored
Mar 03, 2017
by
Luke A Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hazard' into 'master'
Hazard See merge request
!19
parents
50916e2f
9b7f4f64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Assets/Scripts/Util/BreakawayPlatform.cs
Assets/Scripts/Util/BreakawayPlatform.cs
+18
-0
No files found.
Assets/Scripts/Util/BreakawayPlatform.cs
0 → 100644
View file @
c2f1d8b9
using
UnityEngine
;
using
System.Collections
;
public
class
BreakawayPlatform
:
MonoBehaviour
{
public
float
timeTilBreak
=
3f
;
private
void
Break
(){
Destroy
(
gameObject
);
}
private
void
OnCollisionEnter2D
(
Collision2D
col
)
{
if
(
col
.
gameObject
.
CompareTag
(
"Player"
))
{
Invoke
(
"Break"
,
timeTilBreak
);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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