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
B
Birb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
gadig
Birb
Commits
c3d5d8ba
Commit
c3d5d8ba
authored
Mar 02, 2017
by
Tanner Grehawick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix jump input, add player interpolation
parent
6b92d20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Assets/Scenes/CharacterTest.unity
Assets/Scenes/CharacterTest.unity
+0
-0
Assets/Scripts/Birb/Jump.cs
Assets/Scripts/Birb/Jump.cs
+10
-1
No files found.
Assets/Scenes/CharacterTest.unity
View file @
c3d5d8ba
No preview for this file type
Assets/Scripts/Birb/Jump.cs
View file @
c3d5d8ba
...
...
@@ -8,11 +8,20 @@ public class Jump : AbstractBehavior {
public
float
airJumpHeight
=
5
;
public
int
airJumpCount
=
1
;
bool
jumpRequested
;
int
airJumpsMade
=
0
;
void
Update
()
{
if
(!
jumpRequested
&&
inputState
.
GetButtonPressed
(
inputButtons
[
0
]))
{
jumpRequested
=
true
;
}
}
void
FixedUpdate
()
{
if
(
inputState
.
GetButtonPressed
(
inputButtons
[
0
])
)
{
if
(
jumpRequested
)
{
Activate
();
jumpRequested
=
false
;
}
}
...
...
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