You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
28 lines
601 B
C#
28 lines
601 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class InputBufferItem
|
|
{
|
|
private readonly int _timeBeforeActionsExpire = 20;
|
|
public int _timestamp;
|
|
public InputEnum _inputEnum;
|
|
public int _priority;
|
|
public Func<bool> Execute;
|
|
|
|
public InputBufferItem(InputEnum inputEnum, int timestamp)
|
|
{
|
|
_inputEnum = inputEnum;
|
|
_timestamp = timestamp;
|
|
_priority = (int)inputEnum;
|
|
}
|
|
|
|
public bool CheckIfValid()
|
|
{
|
|
if (_timestamp + _timeBeforeActionsExpire >= DemonicsWorld.Frame)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|