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
T
Turtle Takeover Reloaded
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
GameDevWeek
S
Sommersemester 2019
Unity
Turtle Takeover Reloaded
Commits
5e38c55b
Commit
5e38c55b
authored
Sep 21, 2019
by
RaptorTwitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added HP for Turtles!!;
parent
d1da16a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Assets/_Game/Scripts/AI/ToidHeart.cs
Assets/_Game/Scripts/AI/ToidHeart.cs
+10
-1
No files found.
Assets/_Game/Scripts/AI/ToidHeart.cs
View file @
5e38c55b
...
...
@@ -5,9 +5,11 @@ using UnityEngine;
public
class
ToidHeart
:
MonoBehaviour
{
public
GameObject
explosion
;
public
GameObject
spark
;
public
AudioSource
shotSFX
;
public
int
dropChance
;
public
PickupLogic
pickup
;
public
int
hp
=
1
;
private
bool
dead
;
private
GameMaster
gm
;
// Start is called before the first frame update
...
...
@@ -24,7 +26,14 @@ public class ToidHeart : MonoBehaviour
public
void
killToid
()
{
dead
=
true
;
hp
--;
if
(
hp
>
0
&&
spark
!=
null
)
Instantiate
(
spark
,
this
.
transform
.
position
,
Quaternion
.
Euler
(
90
,
transform
.
rotation
.
y
,
transform
.
rotation
.
z
));
if
(
hp
<=
0
)
dead
=
true
;
}
void
initDeath
()
...
...
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