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
e646a165
Commit
e646a165
authored
Jun 06, 2015
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make dash animation adjust to dash direction
parent
dbd944a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
5 deletions
+1
-5
Player Four.prefab
Assets/Resources/Prefabs/Player Four.prefab
+0
-0
Player One.prefab
Assets/Resources/Prefabs/Player One.prefab
+0
-0
Player Three.prefab
Assets/Resources/Prefabs/Player Three.prefab
+0
-0
Player Two.prefab
Assets/Resources/Prefabs/Player Two.prefab
+0
-0
PlayerControl.cs
Assets/Scripts/PlayerControl.cs
+1
-5
No files found.
Assets/Resources/Prefabs/Player Four.prefab
View file @
e646a165
No preview for this file type
Assets/Resources/Prefabs/Player One.prefab
View file @
e646a165
No preview for this file type
Assets/Resources/Prefabs/Player Three.prefab
View file @
e646a165
No preview for this file type
Assets/Resources/Prefabs/Player Two.prefab
View file @
e646a165
No preview for this file type
Assets/Scripts/PlayerControl.cs
View file @
e646a165
...
...
@@ -106,6 +106,7 @@ public class PlayerControl : MonoBehaviour
hasLandedSinceLastDash
=
false
;
//dash effect:
dashAnimator
.
transform
.
rotation
=
Quaternion
.
FromToRotation
(
Vector2
.
right
,
(
Vector2
)
currentDashDirection
);
dashAnimator
.
SetTrigger
(
"play"
);
}
...
...
@@ -124,15 +125,10 @@ public class PlayerControl : MonoBehaviour
velocity
=
body2D
.
velocity
;
if
(
inputMapping
.
isRightPressed
())
{
if
(
transform
.
localScale
.
x
>
0f
)
transform
.
localScale
=
new
Vector3
(-
transform
.
localScale
.
x
,
transform
.
localScale
.
y
,
transform
.
localScale
.
z
);
velocity
.
x
=
runSpeed
;
}
else
if
(
inputMapping
.
isLeftPressed
())
{
if
(
transform
.
localScale
.
x
<
0f
)
transform
.
localScale
=
new
Vector3
(-
transform
.
localScale
.
x
,
transform
.
localScale
.
y
,
transform
.
localScale
.
z
);
velocity
.
x
=
-
runSpeed
;
}
...
...
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