Removed Trigger References

This commit is contained in:
Syntriax 2022-11-20 18:47:28 +03:00
parent d9b1b18328
commit 76ed9312e6
1 changed files with 1 additions and 7 deletions

View File

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