public static void InitHashGrid(int seed) { hashGrid = new Float2[hashGridSize * hashGridSize]; Random.State currentState = Random.state; Random.InitState(seed); for (int i = 0; i < hashGrid.Length; i++) { hashGrid[i] = Float2.Create(); } Random.state = currentState; }
void OnMouseWheelScrolled(object sender, MouseWheelScrollEventArgs args) { int axis = args.Wheel switch { Mouse.Wheel.HorizontalWheel => 0, Mouse.Wheel.VerticalWheel => 1, _ => throw ExceptionHelper.Invalid(nameof(args.Wheel), args.Wheel, InvalidType.unexpected) }; MouseHovering?.OnMouseScrolled(Float2.Create(axis, args.Delta)); } }