| | |
| | | // 有特效可能带spine又带unity特效的情况 |
| | | spineComp = gameObject.GetComponentInChildren<SkeletonAnimation>(true); |
| | | |
| | | |
| | | |
| | | if (effectConfig.effectPos != null && effectConfig.effectPos.Length >= 2) |
| | | { |
| | | rectTrans.anchoredPosition += new Vector2((isRedCamp ? 1f : -1f) * effectConfig.effectPos[0], effectConfig.effectPos[1]); |
| | |
| | | spineComp.Initialize(true); |
| | | spineComp.timeScale = speedRate; |
| | | |
| | | if (scaleX != 0f && spineComp != null && spineComp.skeleton != null) |
| | | { |
| | | spineComp.skeleton.ScaleX = scaleX; |
| | | } |
| | | |
| | | spineComp.skeleton.A = Alpha; |
| | | |
| | | spineAnimationState = spineComp.state; |
| | |
| | | spineComp.enabled = true; |
| | | |
| | | spineComp.timeScale = speedRate; |
| | | |
| | | spineComp.LateUpdate(); |
| | | |
| | | |
| | | Spine.Animation animation = spineAnimationState.Data.SkeletonData.Animations.First(); |
| | | spineAnimationState.SetAnimation(0, animation, effectConfig.isLoop != 0); |
| | |
| | | boneFollower.Initialize(); |
| | | boneFollower.LateUpdate(); |
| | | } |
| | | |
| | | private float scaleX = 0f; |
| | | |
| | | public void SetScaleX(float v) |
| | | { |
| | | if (spineComp != null && spineComp.skeleton != null) |
| | | { |
| | | spineComp.skeleton.ScaleX = v; |
| | | } |
| | | else |
| | | { |
| | | scaleX = v; |
| | | } |
| | | } |
| | | } |