Texture IRsiStateLike.GetFrame(RSI.State.Direction dir, int frame) { if (frame != 0) { throw new IndexOutOfRangeException(); } return(this); }
public bool IsOccluding(RSI rsi, RSI.StateId state, RSI.State.Direction dir, int frame, Vector2i pos) { if (!_rsiMaps.TryGetValue(rsi, out var rsiData)) { return(false); } var offset = rsiData.Offsets[state][(int)dir][frame]; return(SampleClickMap(rsiData.ClickMap, pos, rsi.Size, offset)); }
public bool IsOccluding(RSI rsi, RSI.StateId state, RSI.State.Direction dir, int frame, Vector2i pos) { if (!_rsiMaps.TryGetValue(rsi, out var rsiData)) { return(false); } if (!rsiData.Offsets.TryGetValue(state, out var stateDat) || stateDat.Length <= (int)dir) { return(false); } var dirDat = stateDat[(int)dir]; if (dirDat.Length <= frame) { return(false); } var offset = dirDat[frame]; return(SampleClickMap(rsiData.ClickMap, pos, rsi.Size, offset)); }