public void Initialize(IXTween[] targets, ITimer ticker, float position) { base.Initialize(ticker, position); int l = targets.Length; _duration = 0; if (l > 0) { _a = targets[0] as IIXTween; _a.InitializeGroup(); _duration += _a.Duration; _durationList.Add(_a.Duration); if (l > 1) { _b = targets[1] as IIXTween; _b.InitializeGroup(); _duration += _b.Duration; _durationList.Add(_b.Duration); if (l > 2) { _c = targets[2] as IIXTween; _c.InitializeGroup(); _duration += _c.Duration; _durationList.Add(_c.Duration); if (l > 3) { _d = targets[3] as IIXTween; _d.InitializeGroup(); _duration += _d.Duration; _durationList.Add(_d.Duration); if (l > 4) { int length = l - 4; _targets = new IIXTween[length]; for (int i = 4; i < l; ++i) { IIXTween t = targets[i] as IIXTween; t.InitializeGroup(); _duration += t.Duration; _durationList.Add(t.Duration); _targets[i - 4] = t; } } } } } } }
public override void Dispose() { base.Dispose(); if (this._a != null) { if (!this._a.Disposed) { this._a.Release(); } } if (this._b != null) { if (!this._b.Disposed) { this._b.Release(); } } if (this._c != null) { if (!this._c.Disposed) { this._c.Release(); } } if (this._d != null) { if (!this._d.Disposed) { this._d.Release(); } } if (this._targets != null) { int length = this._targets.Length; for (int i = 0; i < length; ++i) { if (!this._targets[i].Disposed) { this._targets[i].Release(); } } } this._a = null; this._b = null; this._c = null; this._d = null; this._targets = null; }