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
a5328612
Commit
a5328612
authored
Jun 05, 2015
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused fields in PlayerController
parent
a8cee5b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
PlayerControl.cs
Assets/Scripts/PlayerControl.cs
+0
-10
No files found.
Assets/Scripts/PlayerControl.cs
View file @
a5328612
...
@@ -6,8 +6,6 @@ using GamepadInput;
...
@@ -6,8 +6,6 @@ using GamepadInput;
public
class
PlayerControl
:
MonoBehaviour
public
class
PlayerControl
:
MonoBehaviour
{
{
private
Rigidbody2D
body2D
;
private
Rigidbody2D
body2D
;
private
Vector3
lastPos
;
// we make sure the last Pos is never the curPos.
private
Vector2
moveDirection
;
public
Transform
groundCheck
;
public
Transform
groundCheck
;
public
LayerMask
mask
;
public
LayerMask
mask
;
...
@@ -87,10 +85,6 @@ public class PlayerControl : MonoBehaviour
...
@@ -87,10 +85,6 @@ public class PlayerControl : MonoBehaviour
void
FixedUpdate
()
void
FixedUpdate
()
{
{
//Update last position:
lastPos
=
transform
.
position
;
if
(
isGrounded
())
if
(
isGrounded
())
velocity
.
y
=
0
;
velocity
.
y
=
0
;
...
@@ -163,10 +157,6 @@ public class PlayerControl : MonoBehaviour
...
@@ -163,10 +157,6 @@ public class PlayerControl : MonoBehaviour
//finally set the velocity:
//finally set the velocity:
body2D
.
velocity
=
velocity
+
currentPushSpeed
;
body2D
.
velocity
=
velocity
+
currentPushSpeed
;
//update move direction after the currentposition was updated:
moveDirection
=
(
transform
.
position
-
lastPos
).
normalized
;
}
}
private
bool
isGrounded
()
private
bool
isGrounded
()
...
...
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