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
ab195c8a
Commit
ab195c8a
authored
Jun 06, 2015
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make bullets spawn slightly higher than the player
parent
6a22e00b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
PlayerControl.cs
Assets/Scripts/PlayerControl.cs
+2
-1
No files found.
Assets/Scripts/PlayerControl.cs
View file @
ab195c8a
...
...
@@ -251,6 +251,7 @@ public class PlayerControl : MonoBehaviour
/// Falls das im Editor falsch ist: Auf 0.2 setzen.
/// </summary>
public
float
spawnDistance
=
0.2f
;
public
float
bulletYOffset
=
0.1f
;
public
void
setPowerUpType
(
int
type
)
{
powerUpType
=
type
;
...
...
@@ -260,7 +261,7 @@ public class PlayerControl : MonoBehaviour
private
void
shoot
()
{
float
dir
=
-
Mathf
.
Sign
(
transform
.
localScale
.
x
);
Vector2
pos
=
new
Vector2
(
transform
.
position
.
x
+
dir
*
spawnDistance
,
transform
.
position
.
y
);
Vector2
pos
=
((
Vector2
)
transform
.
position
)
+
new
Vector2
(
dir
*
spawnDistance
,
bulletYOffset
);
switch
(
powerUpType
)
{
...
...
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