Exemplo n.º 1
0
    public static string ShowLog(InputDataComponent inputComp)
    {
        var cachedStr = string.Empty;

        if (0 != (left & inputComp.state))
        {
            cachedStr += " Left";
        }

        if (0 != (right & inputComp.state))
        {
            cachedStr += " Right";
        }

        if (0 != (jump & inputComp.state))
        {
            cachedStr += " Jump";
        }

        if (0 != (attack & inputComp.state))
        {
            cachedStr += " Attack";
        }

        if (0 != (axis & inputComp.state))
        {
            cachedStr += " Axis";
        }

        if (0 != (crouch & inputComp.state))
        {
            cachedStr += " Crouch";
        }

        return(cachedStr);
    }
Exemplo n.º 2
0
 public static bool HasState(InputDataComponent inputComp, int compareState)
 {
     return(0 != (inputComp.state & compareState));
 }