示例#1
0
    public STMTextInfo(STMTextInfo clone)
    {
        this.ch        = clone.ch;
        this.pos       = clone.pos;
        this.offset    = clone.offset;
        this.line      = clone.line;
        this.rawIndex  = clone.rawIndex;
        this.indent    = clone.indent;
        this.ev        = new List <string>(clone.ev);
        this.ev2       = new List <string>(clone.ev2);
        this.colorData = clone.colorData;
        //this.colorData = ScriptableObject.CreateInstance<STMColorData>();
//		this.colorData.color = clone.colorData.color;
        this.gradientData = clone.gradientData;
        this.textureData  = clone.textureData;
        this.size         = clone.size;
        //this.delayData = ScriptableObject.CreateInstance<STMDelayData>();
//		this.delayData.count = clone.delayData.count;
        this.delayData  = clone.delayData;
        this.waveData   = clone.waveData;
        this.jitterData = clone.jitterData;
        this.alignment  = clone.alignment;

        this.readTime     = clone.readTime;
        this.unreadTime   = clone.unreadTime;
        this.drawAnimData = clone.drawAnimData;

        //this.clipsFolderName = clone.clipsFolderName;
        this.audioClipData     = clone.audioClipData;
        this.stopPreviousSound = clone.stopPreviousSound;
        this.pitchMode         = clone.pitchMode;
        this.overridePitch     = clone.overridePitch;
        this.minPitch          = clone.minPitch;
        this.maxPitch          = clone.maxPitch;
        this.speedReadPitch    = clone.speedReadPitch;
        this.readDelay         = clone.readDelay;
        this.drawOrder         = clone.drawOrder;

        //this.submeshNumber = clone.submeshNumber;
        this.fontData      = clone.fontData;
        this.quadData      = clone.quadData;
        this.isQuad        = clone.isQuad;
        this.materialData  = clone.materialData;
        this.soundClipData = clone.soundClipData;

        this.quadIndex = clone.quadIndex;
    }
示例#2
0
    public void SetValues(STMTextInfo clone)
    {
        this.ch       = clone.ch;
        this.pos      = clone.pos;
        this.offset.x = clone.offset.x;
        this.offset.y = clone.offset.y;
        this.offset.z = clone.offset.z;
        this.line     = clone.line;
        this.rawIndex = clone.rawIndex;
        this.indent   = clone.indent;

        if (clone.ev.Count > 0)        //this check saves a TON of time... but im sure there's an even better way? can it just be set directly...?
        {
            this.ev = new List <string>(clone.ev);
        }
        if (clone.ev2.Count > 0)
        {
            this.ev2 = new List <string>(clone.ev2);
        }

        //yeah... does this cause errors? events are just strings so i dont see why... hm
        //this.ev = clone.ev;
        //this.ev2 = clone.ev2;


        this.colorData = clone.colorData;
        //this.colorData = ScriptableObject.CreateInstance<STMColorData>();
//		this.colorData.color = clone.colorData.color;
        this.gradientData = clone.gradientData;
        this.textureData  = clone.textureData;
        this.size         = clone.size;
        //this.delayData = ScriptableObject.CreateInstance<STMDelayData>();
//		this.delayData.count = clone.delayData.count;
        this.delayData  = clone.delayData;
        this.waveData   = clone.waveData;
        this.jitterData = clone.jitterData;
        this.alignment  = clone.alignment;

        this.readTime     = clone.readTime;
        this.unreadTime   = clone.unreadTime;
        this.drawAnimData = clone.drawAnimData;

        //this.clipsFolderName = clone.clipsFolderName;
        this.audioClipData     = clone.audioClipData;
        this.stopPreviousSound = clone.stopPreviousSound;
        this.pitchMode         = clone.pitchMode;
        this.overridePitch     = clone.overridePitch;
        this.minPitch          = clone.minPitch;
        this.maxPitch          = clone.maxPitch;
        this.speedReadPitch    = clone.speedReadPitch;
        this.readDelay         = clone.readDelay;
        this.drawOrder         = clone.drawOrder;

        //this.submeshNumber = clone.submeshNumber;
        this.fontData      = clone.fontData;
        this.quadData      = clone.quadData;
        this.isQuad        = clone.isQuad;
        this.materialData  = clone.materialData;
        this.soundClipData = clone.soundClipData;

        this.quadIndex = clone.quadIndex;

        this.submeshChange = clone.submeshChange;
        this.invoked       = false;
    }
示例#3
0
    public void SetValues(SuperTextMesh stm)
    {
        this.ch.style = stm.style;
//reset these ones too because of caching changes:
        this.gradientData = null;
        this.colorData    = null;
        this.textureData  = null;

        this.delayData     = null;
        this.waveData      = null;
        this.jitterData    = null;
        this.audioClipData = null;
        this.fontData      = null;
        this.quadData      = null;


        //this.colorData = ScriptableObject.CreateInstance<STMColorData>();
//		this.colorData.color = stm.color;
        this.offset.x = 0f;
        this.offset.y = 0f;
        this.offset.z = 0f;
        this.indent   = 0;
        this.rawIndex = 0;
        this.size.x   = stm.size;
        this.size.y   = stm.size;

        this.ev.Clear();        //
        this.ev2.Clear();       //

        this.alignment         = stm.alignment;
        this.stopPreviousSound = stm.stopPreviousSound;
        this.pitchMode         = stm.pitchMode;
        this.overridePitch     = stm.overridePitch;
        this.minPitch          = stm.minPitch;
        this.maxPitch          = stm.maxPitch;
        this.speedReadPitch    = stm.speedReadPitch;
        this.readDelay         = stm.readDelay;
        if (this.drawAnimData != null)
        {
            if (this.drawAnimData.name != stm.drawAnimName)
            {
                this.drawAnimData = Resources.Load <STMDrawAnimData>("STMDrawAnims/" + stm.drawAnimName);
                if (this.drawAnimData == null)
                {
                    STMDrawAnimData[] tmpDrawAnims = Resources.LoadAll <STMDrawAnimData>("STMDrawAnims");
                    if (tmpDrawAnims.Length > 0)
                    {
                        this.drawAnimData = tmpDrawAnims[0];                         //get first one
                    }
                }
            }
            //else do nothing, already has a match!
        }
        else
        {
            this.drawAnimData = Resources.Load <STMDrawAnimData>("STMDrawAnims/" + stm.drawAnimName);
            if (this.drawAnimData == null)            //still null?
            {
                STMDrawAnimData[] tmpDrawAnims = Resources.LoadAll <STMDrawAnimData>("STMDrawAnims");
                if (tmpDrawAnims.Length > 0)
                {
                    this.drawAnimData = tmpDrawAnims[0];                     //get first one
                }
            }
        }
        this.drawOrder = stm.drawOrder;
        this.quadIndex = -1;
        this.isQuad    = false;


        this.materialData  = null;
        this.soundClipData = null;
        this.quadIndex     = -1;

        this.submeshChange = false;
        this.invoked       = false;
    }