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
6a9ec918
Commit
6a9ec918
authored
Jun 05, 2015
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix null reference in PlayerHealth
parent
7d9c2dd3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
PlayerHealth.cs
Assets/Scripts/PlayerHealth.cs
+1
-2
No files found.
Assets/Scripts/PlayerHealth.cs
View file @
6a9ec918
...
@@ -10,7 +10,6 @@ public class PlayerHealth : MonoBehaviour {
...
@@ -10,7 +10,6 @@ public class PlayerHealth : MonoBehaviour {
private
bool
alive
=
true
;
private
bool
alive
=
true
;
private
Scrollbar
healthbar
;
private
Scrollbar
healthbar
;
private
PlayerControl
playerControl
;
private
PlayerControl
playerControl
;
private
GameStateTracker
gameStateTracker
;
private
bool
hasShield
=
false
;
private
bool
hasShield
=
false
;
public
void
init
(
int
playerNumber
)
public
void
init
(
int
playerNumber
)
...
@@ -31,7 +30,7 @@ public class PlayerHealth : MonoBehaviour {
...
@@ -31,7 +30,7 @@ public class PlayerHealth : MonoBehaviour {
{
{
Debug
.
Log
(
"Player "
+
name
+
" dead."
);
Debug
.
Log
(
"Player "
+
name
+
" dead."
);
alive
=
false
;
alive
=
false
;
gameStateTracker
.
playerDied
(
name
);
((
GameStateTracker
)
Object
.
FindObjectOfType
(
typeof
(
GameStateTracker
)))
.
playerDied
(
name
);
Destroy
(
gameObject
);
Destroy
(
gameObject
);
}
}
}
}
...
...
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