public void HoldTool(Type toolType) { if (UserGameObject != null) { _currentTool.OnToolDropped(this); ToolCache.StowTool(_currentTool); _currentTool = ToolCache.GetOrCreateTool(toolType); _currentTool.OnToolHeld(this); } }
public void HoldTool(Type toolType) { if (UserGameObject != null) { _currentTool.IsHeld = false; ToolCache.StowTool(_currentTool); _currentTool = ToolCache.GetOrCreateTool(toolType); _currentTool.IsHeld = true; } }
public void DropTool() { // We only drop a tool is it isn't the default target tool. if (UserGameObject != null && _currentTool.GetType() != typeof(TargetTool)) { _currentTool.OnToolDropped(this); ToolCache.StowTool(_currentTool); _currentTool = ToolCache.GetOrCreateTool <TargetTool>(); _currentTool.OnToolHeld(this); } }