예제 #1
0
    public Vec2 NeedVel()
    {
        Vec2 t = Vec2.Zero;

        t += MoveLeft.Pressed() ? new Vec2(-1, 0) : Vec2.Zero;
        t += MoveRight.Pressed() ? new Vec2(1, 0) : Vec2.Zero;
        t += MoveDown.Pressed() ? new Vec2(0, -1) : Vec2.Zero;
        return(t);
    }