private void createPlacement() { if (currentPlacement != null) { return; } var blueprint = CurrentTool?.CreatePlacementBlueprint(); if (blueprint != null) { // doing this post-creations as adding the default hit sample should be the case regardless of the ruleset. blueprint.HitObject.Samples.Add(new HitSampleInfo { Name = HitSampleInfo.HIT_NORMAL }); placementBlueprintContainer.Child = currentPlacement = blueprint; // Fixes a 1-frame position discrepancy due to the first mouse move event happening in the next frame updatePlacementPosition(); updatePlacementSamples(); updatePlacementNewCombo(); } }
/// <summary> /// Refreshes the current placement tool. /// </summary> private void refreshTool() { placementBlueprintContainer.Clear(); currentPlacement = null; var blueprint = CurrentTool?.CreatePlacementBlueprint(); if (blueprint != null) { placementBlueprintContainer.Child = currentPlacement = blueprint; // Fixes a 1-frame position discrepancy due to the first mouse move event happening in the next frame updatePlacementPosition(inputManager.CurrentState.Mouse.Position); } }
private void createPlacement() { if (currentPlacement != null) { return; } var blueprint = CurrentTool?.CreatePlacementBlueprint(); if (blueprint != null) { placementBlueprintContainer.Child = currentPlacement = blueprint; // Fixes a 1-frame position discrepancy due to the first mouse move event happening in the next frame updatePlacementPosition(); } }