Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mr BigSock
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gard Aleksander Furre
Mr BigSock
Merge requests
!83
Gardaf
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Gardaf
gardaf
into
main
Overview
0
Commits
2
Pipelines
0
Changes
5
Merged
Gard Aleksander Furre
requested to merge
gardaf
into
main
2 years ago
Overview
0
Commits
2
Pipelines
0
Changes
5
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
fa9cf82f
2 commits,
2 years ago
5 files
+
138
−
71
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
MrBigsock/Assets/Code/Slime/SlimeController.cs
+
7
−
7
Options
@@ -47,25 +47,25 @@ namespace BigSock {
/*
Minimum time the slime should idle before it can charge.
*/
protected
static
readonly
TimeSpan
IDLE_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
1
,
0
);
protected
static
readonly
TimeSpan
IDLE_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
0
,
5
);
/*
Minimum time the slime should charge before it can leap.
*/
protected
static
readonly
TimeSpan
CHARGE_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
2
,
0
);
protected
static
readonly
TimeSpan
CHARGE_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
1
,
0
);
/*
Maximum time the slime should leap before it can idle.
*/
protected
static
readonly
TimeSpan
LEAP_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
4
,
0
);
protected
static
readonly
TimeSpan
LEAP_WAIT_TIME
=
new
TimeSpan
(
0
,
0
,
0
,
2
,
0
);
/*
The force the slime leaps at.
*/
public
double
LeapForce
=>
MovementSpeed
*
4
;
public
double
LeapForce
=>
MovementSpeed
*
10
;
//void Start() {
// rb = GetComponent<Rigidbody2D>();
//
m_Animator = gameObject.GetComponent<Animator>();
//
m_Animator = gameObject.GetComponent<Animator>();
// followCollider = transform.Find("followCollider").GetComponent<EmptyCollider>();
// followCollider.OnColliderEnter2D_Action += Move_OnColliderEnter2D;
// followCollider.OnColliderStay2D_Action += Move_OnColliderStay2D;
@@ -90,7 +90,7 @@ namespace BigSock {
// Update the state.
State
=
SlimeState
.
Charging
;
NextTimeStateCanChange
=
DateTime
.
Now
+
CHARGE_WAIT_TIME
;
m_Animator
.
SetTrigger
(
"
walk
"
);
m_Animator
.
SetTrigger
(
"
idle
"
);
}
}
@@ -117,7 +117,7 @@ namespace BigSock {
// Update the state.
State
=
SlimeState
.
Idle
;
NextTimeStateCanChange
=
DateTime
.
Now
+
IDLE_WAIT_TIME
;
m_Animator
.
SetTrigger
(
"
idle
"
);
m_Animator
.
SetTrigger
(
"
walk
"
);
}
}
Loading