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
S
Suck It
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
GameDevWeek
W
Wintersemester 2018-2019
Unity
Suck It
Commits
6d4d4634
Commit
6d4d4634
authored
Mar 30, 2019
by
Michael But
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.fsi.hochschule-trier.de:GameDevWeek/ws-18_19/unity/suck-it
parents
23289da6
e81eb1c0
Pipeline
#3031
waiting for manual action with stages
in 7 minutes and 18 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
2 deletions
+48
-2
Assets/_Game/Scenes/MainLevel.unity
Assets/_Game/Scenes/MainLevel.unity
+30
-0
Assets/_Game/Scripts/Elements/InteractionObject.cs
Assets/_Game/Scripts/Elements/InteractionObject.cs
+0
-1
Assets/_Game/Scripts/Player/MovementController.cs
Assets/_Game/Scripts/Player/MovementController.cs
+17
-0
ProjectSettings/InputManager.asset
ProjectSettings/InputManager.asset
+1
-1
No files found.
Assets/_Game/Scenes/MainLevel.unity
View file @
6d4d4634
...
...
@@ -16416,6 +16416,11 @@ PrefabInstance:
propertyPath: allResponse.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: UpdateMovementParameters
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_Target
...
...
@@ -16426,6 +16431,31 @@ PrefabInstance:
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: OnChargesChange
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
objectReference: {fileID: 1949298894}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value: SetAirJumpCount
objectReference: {fileID: 0}
- target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6275ea6a12d5b40b99ac332a7818ebf4, type: 3}
--- !u!1001 &837944739
Assets/_Game/Scripts/Elements/InteractionObject.cs
View file @
6d4d4634
...
...
@@ -20,7 +20,6 @@ namespace _Game.Scripts.Elements
public
void
InfuseElement
()
{
print
(
"Infused "
+
this
.
gameObject
.
tag
);
_isReady
=
false
;
_spriteRenderer
.
color
=
_idleColor
;
Invoke
(
"SetReady"
,
cooldown
);
...
...
Assets/_Game/Scripts/Player/MovementController.cs
View file @
6d4d4634
...
...
@@ -34,6 +34,7 @@ public class MovementController : MonoBehaviour
private
bool
m_Grounded
=
false
;
// Whether or not the player is grounded.
private
bool
m_Swimming
=
false
;
private
bool
m_Airborn
=
true
;
private
bool
m_isAir
=
false
;
private
Rigidbody2D
m_Rigidbody2D
;
private
bool
m_FacingRight
=
true
;
// For determining which way the player is currently facing.
private
Vector3
m_Velocity
=
Vector3
.
zero
;
...
...
@@ -110,6 +111,7 @@ public class MovementController : MonoBehaviour
r_Animator
.
SetBool
(
"isJumping"
,
m_Jumped
);
r_Animator
.
SetBool
(
"isAirborn"
,
m_Airborn
);
r_Animator
.
SetBool
(
"isSwimming"
,
m_Swimming
);
//r_Animator.SetBool("isAirCharged", m_isAir);
}
...
...
@@ -155,6 +157,7 @@ public class MovementController : MonoBehaviour
m_Grounded
=
false
;
m_TempJumpCount
--;
if
(
r_State
.
GetCurrentElement
()
==
InfusedElement
.
Air
)
r_State
.
ChangeCharges
(-
1
);
print
(
"AirJump: Charges left = "
+
m_TempJumpCount
);
m_Rigidbody2D
.
velocity
=
Vector2
.
up
*
m_JumpForce
;
OnJumpEvent
.
Invoke
();
StartCoroutine
(
Wait
(
m_SecondsWaitToJump
));
...
...
@@ -180,6 +183,14 @@ public class MovementController : MonoBehaviour
else
{
MovementState
state
=
r_State
.
GetCurrentMovementState
();
if
(
r_State
.
GetCurrentElement
()
==
InfusedElement
.
Air
)
{
m_isAir
=
true
;
}
else
{
m_isAir
=
false
;
}
m_JumpForce
=
state
.
jumpForce
;
m_MovementSmoothing
=
state
.
smoothing
;
m_AirControl
=
state
.
airControl
;
...
...
@@ -191,6 +202,12 @@ public class MovementController : MonoBehaviour
}
}
public
void
SetAirJumpCount
()
{
if
(
r_State
.
GetCurrentElement
()
!=
InfusedElement
.
Air
)
return
;
m_TempJumpCount
=
r_State
.
GetCharges
();
}
public
void
SetSwimming
(
bool
value
)
{
m_Swimming
=
value
;
...
...
ProjectSettings/InputManager.asset
View file @
6d4d4634
...
...
@@ -42,7 +42,7 @@ InputManager:
descriptiveName
:
descriptiveNegativeName
:
negativeButton
:
positiveButton
:
left ctrl
positiveButton
:
f
altNegativeButton
:
altPositiveButton
:
mouse
0
gravity
:
1000
...
...
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