Removed Trigger References
This commit is contained in:
parent
d9b1b18328
commit
76ed9312e6
|
@ -1,10 +1,8 @@
|
||||||
using Syntriax.Modules.ToggleState;
|
using Syntriax.Modules.ToggleState;
|
||||||
using Syntriax.Modules.Trigger;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Syntriax.Modules.Action
|
namespace Syntriax.Modules.Action
|
||||||
{
|
{
|
||||||
|
|
||||||
[RequireComponent(typeof(Rigidbody2D))]
|
[RequireComponent(typeof(Rigidbody2D))]
|
||||||
public class PlatformerJump : ActionBaseWithDeactivation
|
public class PlatformerJump : ActionBaseWithDeactivation
|
||||||
{
|
{
|
||||||
|
@ -29,13 +27,11 @@ namespace Syntriax.Modules.Action
|
||||||
|
|
||||||
protected IToggleState gameObjectToggleState = null;
|
protected IToggleState gameObjectToggleState = null;
|
||||||
protected bool airSuspension = false;
|
protected bool airSuspension = false;
|
||||||
protected IGroundTrigger groundCheck = null;
|
|
||||||
protected Rigidbody2D rigid = null;
|
protected Rigidbody2D rigid = null;
|
||||||
|
|
||||||
protected virtual void Start()
|
protected virtual void Start()
|
||||||
{
|
{
|
||||||
rigid = GetComponent<Rigidbody2D>();
|
rigid = GetComponent<Rigidbody2D>();
|
||||||
groundCheck = GetComponentInChildren<IGroundTrigger>();
|
|
||||||
gameObjectToggleState = GetComponent<IToggleState>();
|
gameObjectToggleState = GetComponent<IToggleState>();
|
||||||
|
|
||||||
FallMultiplier = fallMultiplier;
|
FallMultiplier = fallMultiplier;
|
||||||
|
@ -76,9 +72,7 @@ namespace Syntriax.Modules.Action
|
||||||
if (!gameObjectToggleState.IsToggledNullChecked())
|
if (!gameObjectToggleState.IsToggledNullChecked())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (groundCheck.IsTrigerred)
|
Jump();
|
||||||
Jump();
|
|
||||||
|
|
||||||
airSuspension = true;
|
airSuspension = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue