public void SetInfo(ShootTextInfo shootTextInfo) //执行顺序优于Start { content = shootTextInfo.content; animationType = shootTextInfo.animationType; moveType = shootTextInfo.moveType; delayMoveTime = Time.time + shootTextInfo.delayMoveTime; cacheTranform = shootTextInfo.cacheTranform; initializedHorizontalPositionOffset = shootTextInfo.initializedHorizontalPositionOffset; initializedVerticalPositionOffset = shootTextInfo.initializedVerticalPositionOffset; }
public void CreatShootText(string content, TextAnimationType textAnimationType, TextMoveType textMoveType, float delayMoveTime, float initializedVerticalPositionOffset, float initializedHorizontalPositionOffset, Transform tempTransform) { ShootTextInfo shootTextInfo = new ShootTextInfo(); shootTextInfo.content = content; shootTextInfo.animationType = textAnimationType; shootTextInfo.moveType = textMoveType; shootTextInfo.delayMoveTime = delayMoveTime; shootTextInfo.initializedVerticalPositionOffset = initializedVerticalPositionOffset; shootTextInfo.initializedHorizontalPositionOffset = initializedHorizontalPositionOffset; shootTextInfo.cacheTranform = tempTransform; CreatShootText(shootTextInfo); }