public bool Mine(int handId, WorldPos pos, Block block) { if (needCheckMinePower) { if (sceneBlock == null || sceneBlock.blockType != (byte)block.BlockType || sceneBlock.extendId != block.ExtendId || !sceneBlock.pos.EqualOther(pos)) { sceneBlock = new SceneBlock(pos, (byte)block.BlockType, block.ExtendId); } Item item = ItemManager.Instance.GetItem(handId); if (item != null) { SpecialIDMinePower iDPower = sceneBlock.blockData.GetSpecialIDMinePower(item.id); if (iDPower != null) { return(MineSceneBlock(pos, iDPower.power)); } SpecialTypeMinePower typePower = sceneBlock.blockData.GetSpecialTypeMinePower(item.type); if (typePower != null) { return(MineSceneBlock(pos, typePower.power)); } } return(MineSceneBlock(pos, sceneBlock.blockData.normalMinePower)); } else { return(true); } }
public void StartMine() { sceneBlock = null; }
public void StopMine() { sceneBlock = null; HideMineSplitObj(); }