| | |
| | | |
| | | private float m_Alpha = 1f; |
| | | |
| | | public float scaleFactor = 1f;// 长期为1,只在需要跟模型一起缩放的时候更改 值为teamHero.ModelScale |
| | | |
| | | public float Alpha |
| | | { |
| | | get |
| | |
| | | { |
| | | rectTrans.localScale *= effectConfig.effectScale; |
| | | } |
| | | |
| | | rectTrans.localScale *= scaleFactor; |
| | | |
| | | spineComp.loop = effectConfig.isLoop != 0; |
| | | } |
| | |
| | | |
| | | |
| | | // 创建后的特效会自动隐藏 需要手动调用Play才能播放 |
| | | public static BattleEffectPlayer Create(int effectId, BattleField _battleField, Transform parent, bool isRedCamp) |
| | | public static BattleEffectPlayer Create(int effectId, BattleField _battleField, Transform parent, bool isRedCamp, float _scaleRatio) |
| | | { |
| | | // 直接创建特效播放器,不使用对象池 |
| | | BattleEffectPlayer battleEffectPlayer = null; |
| | |
| | | battleEffectPlayer.rectTrans = newGo.AddMissingComponent<RectTransform>(); |
| | | |
| | | battleEffectPlayer.effectId = effectId; |
| | | |
| | | battleEffectPlayer.scaleFactor = _scaleRatio; |
| | | |
| | | // 设置阵营 |
| | | battleEffectPlayer.isRedCamp = isRedCamp; |
| | |
| | | public void BindBone(SkeletonAnimation skeletonAnim, string v) |
| | | { |
| | | Bone bone = skeletonAnim.skeleton.FindBone(v); |
| | | |
| | | isBindBone = false; |
| | | followedBone = null; |
| | | if (null == bone) |
| | | { |
| | | return; |