Beispiel #1
0
        public bool Load(EffectData data)
        {
            if (this.m_EffectInstances == null)
            {
                this.m_EffectInstances = new List <EffectInstance>();
            }
            else
            {
                this.m_EffectInstances.Clear();
            }
            bool result;

            if (null == data)
            {
                result = false;
            }
            else
            {
                this.m_Data    = data;
                this.SourcePos = new Vector3(0f, 0f, 0f);
                this.TargetPos = new Vector3(0f, 0f, 0f);
                foreach (EffectInstanceData current in this.m_Data.InstanceDatas)
                {
                    EffectInstance effectInstance = new EffectInstance();
                    effectInstance.FatherEffect = this;
                    if (effectInstance.Load(current))
                    {
                        this.m_EffectInstances.Add(effectInstance);
                    }
                }
                this.m_Loaded    = true;
                this.m_StartTime = Time.time;
                result           = true;
            }
            return(result);
        }