Commit d6bf6597 authored by Sebastian's avatar Sebastian

added variable to see if player is infusing an element

parent e81eb1c0
......@@ -82,6 +82,7 @@ namespace _Game.Scripts.Player
_rigidbody2D.bodyType = RigidbodyType2D.Static;
_elementType = _currentObject.tag;
_elementScript = _targetScript;
state.isCharging = true;
Invoke("SuckIt", infusingTime);
}
......@@ -129,6 +130,8 @@ namespace _Game.Scripts.Player
_elementScript.InfuseElement();
_rigidbody2D.bodyType = RigidbodyType2D.Dynamic;
state.isCharging = false;
}
private void OnTriggerEnter2D(Collider2D other)
......
......@@ -20,6 +20,8 @@ namespace _Game.Scripts.Scriptable_Object
[SerializeField] private ElementGameEvent onElementInfused;
[SerializeField] private ChargeGameEvent onChargeChange;
public bool isCharging = false;
[SerializeField][Range(0, 5)] private int charges;
// [SerializeField] private float currentJumpForce;
......
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