Commit 6d4d4634 authored by Michael But's avatar Michael But

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
...@@ -16416,6 +16416,11 @@ PrefabInstance: ...@@ -16416,6 +16416,11 @@ PrefabInstance:
propertyPath: allResponse.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName propertyPath: allResponse.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: UpdateMovementParameters value: UpdateMovementParameters
objectReference: {fileID: 0} 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, - target: {fileID: 9144624198248816053, guid: 6275ea6a12d5b40b99ac332a7818ebf4,
type: 3} type: 3}
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_Target propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_Target
...@@ -16426,6 +16431,31 @@ PrefabInstance: ...@@ -16426,6 +16431,31 @@ PrefabInstance:
propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName propertyPath: response.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: OnChargesChange value: OnChargesChange
objectReference: {fileID: 0} 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_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6275ea6a12d5b40b99ac332a7818ebf4, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 6275ea6a12d5b40b99ac332a7818ebf4, type: 3}
--- !u!1001 &837944739 --- !u!1001 &837944739
...@@ -20,7 +20,6 @@ namespace _Game.Scripts.Elements ...@@ -20,7 +20,6 @@ namespace _Game.Scripts.Elements
public void InfuseElement() public void InfuseElement()
{ {
print("Infused " + this.gameObject.tag);
_isReady = false; _isReady = false;
_spriteRenderer.color = _idleColor; _spriteRenderer.color = _idleColor;
Invoke("SetReady", cooldown); Invoke("SetReady", cooldown);
......
...@@ -34,6 +34,7 @@ public class MovementController : MonoBehaviour ...@@ -34,6 +34,7 @@ public class MovementController : MonoBehaviour
private bool m_Grounded = false; // Whether or not the player is grounded. private bool m_Grounded = false; // Whether or not the player is grounded.
private bool m_Swimming = false; private bool m_Swimming = false;
private bool m_Airborn = true; private bool m_Airborn = true;
private bool m_isAir = false;
private Rigidbody2D m_Rigidbody2D; private Rigidbody2D m_Rigidbody2D;
private bool m_FacingRight = true; // For determining which way the player is currently facing. private bool m_FacingRight = true; // For determining which way the player is currently facing.
private Vector3 m_Velocity = Vector3.zero; private Vector3 m_Velocity = Vector3.zero;
...@@ -110,6 +111,7 @@ public class MovementController : MonoBehaviour ...@@ -110,6 +111,7 @@ public class MovementController : MonoBehaviour
r_Animator.SetBool("isJumping", m_Jumped); r_Animator.SetBool("isJumping", m_Jumped);
r_Animator.SetBool("isAirborn", m_Airborn); r_Animator.SetBool("isAirborn", m_Airborn);
r_Animator.SetBool("isSwimming", m_Swimming); r_Animator.SetBool("isSwimming", m_Swimming);
//r_Animator.SetBool("isAirCharged", m_isAir);
} }
...@@ -155,6 +157,7 @@ public class MovementController : MonoBehaviour ...@@ -155,6 +157,7 @@ public class MovementController : MonoBehaviour
m_Grounded = false; m_Grounded = false;
m_TempJumpCount--; m_TempJumpCount--;
if (r_State.GetCurrentElement() == InfusedElement.Air) r_State.ChangeCharges(-1); if (r_State.GetCurrentElement() == InfusedElement.Air) r_State.ChangeCharges(-1);
print("AirJump: Charges left = " + m_TempJumpCount);
m_Rigidbody2D.velocity = Vector2.up * m_JumpForce; m_Rigidbody2D.velocity = Vector2.up * m_JumpForce;
OnJumpEvent.Invoke(); OnJumpEvent.Invoke();
StartCoroutine(Wait(m_SecondsWaitToJump)); StartCoroutine(Wait(m_SecondsWaitToJump));
...@@ -180,6 +183,14 @@ public class MovementController : MonoBehaviour ...@@ -180,6 +183,14 @@ public class MovementController : MonoBehaviour
else else
{ {
MovementState state = r_State.GetCurrentMovementState(); MovementState state = r_State.GetCurrentMovementState();
if (r_State.GetCurrentElement() == InfusedElement.Air)
{
m_isAir = true;
}
else
{
m_isAir = false;
}
m_JumpForce = state.jumpForce; m_JumpForce = state.jumpForce;
m_MovementSmoothing = state.smoothing; m_MovementSmoothing = state.smoothing;
m_AirControl = state.airControl; m_AirControl = state.airControl;
...@@ -191,6 +202,12 @@ public class MovementController : MonoBehaviour ...@@ -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) public void SetSwimming(bool value)
{ {
m_Swimming = value; m_Swimming = value;
......
...@@ -42,7 +42,7 @@ InputManager: ...@@ -42,7 +42,7 @@ InputManager:
descriptiveName: descriptiveName:
descriptiveNegativeName: descriptiveNegativeName:
negativeButton: negativeButton:
positiveButton: left ctrl positiveButton: f
altNegativeButton: altNegativeButton:
altPositiveButton: mouse 0 altPositiveButton: mouse 0
gravity: 1000 gravity: 1000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment