private void AddressNewCurrentRoot(bool hide) { //means was used already once . could have this object we are looking for spawnerd if (_current != null) { _current = null; } if (_allPersonalObjects.ContainsKey(_currentRoot)) { _current = _allPersonalObjects[_currentRoot]; //for Docker and HeavyLoader so it doesnt show this when on Dock if (_person.Work != null && (_person.Work.HType == H.Dock) && //(_person.Work.HType == H.Dock || _person.Work.HType == H.HeavyLoad) && _person.DistanceToWorkSpawnPoint() < 0.1f) { } //for hammer so is shown else { Show(); } CheckIfHide(hide); return; } if (string.IsNullOrEmpty(_currentRoot)) { return; } _current = FollowObject.Create(_currentRoot, _currentPoint, //Program.PersonObjectContainer.transform, _currentPoint.transform, _person.MyId); _current.transform.rotation = _currentPoint.transform.rotation; _current.transform.position = _currentPoint.transform.position; _allPersonalObjects.Add(_currentRoot, _current); CheckIfHide(hide); }
private void AddressNewCurrentRoot(bool hide) { //means was used already once . could have this object we are looking for spawnerd if (_current != null) { _current = null; } if (_allPersonalObjects.ContainsKey(_currentRoot)) { _current = _allPersonalObjects[_currentRoot]; //for hammer so is shown Show(); CheckIfHide(hide); return; } if (string.IsNullOrEmpty(_currentRoot)) { return; } //ResetPersonPosition(); _current = FollowObject.Create(_currentRoot, _currentPoint, //Program.PersonObjectContainer.transform, _currentPoint.transform, _person.MyId); _current.transform.rotation = _currentPoint.transform.rotation; _current.transform.position = _currentPoint.transform.position; _allPersonalObjects.Add(_currentRoot, _current); CheckIfHide(hide); //ReloadPersonPosition(); }