Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dyingIsMainstream
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gamejam-gpn15
dyingIsMainstream
Commits
6af717c6
Commit
6af717c6
authored
Jun 06, 2015
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix fire not being deleted on restart
parent
0fac9a27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
FireScript.cs
Assets/Scripts/FireScript.cs
+3
-1
No files found.
Assets/Scripts/FireScript.cs
View file @
6af717c6
...
...
@@ -13,6 +13,7 @@ public class FireScript : MonoBehaviour
private
Vector3
startScale
;
//fixes a bug: scale of fire was 0 when attached to the player.
private
Vector2
spawnPosition
;
private
Transform
spawnParent
;
public
float
respawnTime
=
5.0f
;
public
float
relayDelay
=
0.25f
;
...
...
@@ -23,6 +24,7 @@ public class FireScript : MonoBehaviour
{
startScale
=
transform
.
localScale
;
spawnPosition
=
transform
.
position
;
spawnParent
=
transform
.
parent
;
pickupAudio
=
GetComponent
<
AudioSource
>();
}
...
...
@@ -59,7 +61,7 @@ public class FireScript : MonoBehaviour
{
CancelInvoke
(
"stopBurning"
);
parentHealth
=
null
;
transform
.
parent
=
null
;
transform
.
parent
=
spawnParent
;
transform
.
position
=
new
Vector2
(
100
,
100
);
Invoke
(
"Activate"
,
respawnTime
);
}
...
...
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