public void DiggingPostConstructor() { _placeBlockCursor = InstanceProvider.GetInstance <BlockMarker>(); _placeBlockCursor.Init("BuildCursor", WorldSettings.BuildMaterial); _placeBlockCursor.SetBlockId((byte)InventoryModel.SelectedBlockType); _mineBlockCursor = InstanceProvider.GetInstance <BlockMarker>(); _mineBlockCursor.Init("MineCursor", WorldSettings.MineMaterial); _mineBlockCursor.SetMiningProgress(0); Updater.EveryFrame(UpdateCursorBlocks); Updater.EveryFrame(UpdateMining); BlockTypeSelectedSignal.AddListener(BlockTypeSelectedHandler); }
private void BlockTypeSelectedHandler(BlockTypeId id) { _placeBlockCursor.SetBlockId((byte)id); }