public virtual void Fire(UBattleUnit startUnit, Vector3 endPosition, float duration, string easeName = null) { this.BindGameLoop(); _transStart = startUnit.GetBoneTransform("missile"); _startUnit = startUnit; _startUnitId = startUnit.unitId; _startPosition = _transStart.position; _startAngle = _startUnit.curDirectionAngle; _transEnd = null; _endUnit = null; _endUnitId = 0; _endPosition = endPosition; _endTeleportFlag = -1; _duration = duration <= 0 ? _duration : duration; _startTime = GetMSTime(); _easeName = string.IsNullOrEmpty(easeName) ? _easeName : easeName; _easeFunc = EaseFunc.GetFunction(easeName); _transform = this.transform; _transform.position = _startPosition; _isEnded = false; _delayTimeCounter = _delayTime; this.OnEffectStart(); }
public void SetExtraFollowerBoneName(string boneName) { try { _extraFollower.target = _endUnit.GetBoneTransform(boneName); } catch (Exception ex) { FTDebug.LogError($"SetExtraFollowerBoneName Error {this.gameObject.name} {ex.Message} {ex.StackTrace}", true); } }