public override void OnStart() { double duration = this.m_ItemID != 3853 ? (this.m_Source != null || this._effectId != 9501 ? 0.5 : 0.1 + Engine.Random.NextDouble() * 0.4) : 1.0; this.m_Start = Renderer.m_Frames; this.m_Sync = new TimeSync(duration); }
protected internal override void Draw(int x, int y) { if (this.m_xLast != x || this.m_yLast != y) { this.m_xLast = x; this.m_yLast = y; Clipper clipper = new Clipper(x + 32, y + 66, 196, 92); this.m_ContentClipper = clipper; foreach (Gump gump in this.m_Children.ToArray()) { if (gump is GSellGump_OfferedItem) { ((GRegion)gump).Clipper = clipper; } } } if (this.m_Signature != null && this.m_SignatureAnimation != null) { double normalized = this.m_SignatureAnimation.Normalized; if (normalized >= 1.0) { this.m_Signature.Scissor((Clipper)null); this.m_SignatureAnimation = (TimeSync)null; } else { this.m_Signature.Scissor(0, 0, (int)(normalized * (double)this.m_Signature.Width), this.m_Signature.Height); } Engine.Redraw(); } this.m_yOffset = this.m_LastHeight < 0 ? 67 : 67 - (int)(this.m_Slider.GetValue() / 50.0 * (double)this.m_LastHeight); this.m_LastOffset = 67 - this.m_yOffset; base.Draw(x, y); }
public void Start(bool update) { if (this.m_Sync != null) { return; } if (WalkAnimation.m_SyncPool.Count > 0) { this.m_Sync = (TimeSync)WalkAnimation.m_SyncPool.Dequeue(); this.m_Sync.Initialize((double)this.m_Duration); } else { this.m_Sync = new TimeSync((double)this.m_Duration); } this.m_Advance = (this.m_NewDir & 7) >= 1 && (this.m_NewDir & 7) <= 4; if (!this.m_Advance) { return; } this.m_Mobile.SetLocation(this.m_NewX, this.m_NewY, this.m_NewZ); if (update) { this.m_Mobile.Update(); } if (!this.m_Mobile.Player) { return; } Renderer.eOffsetX += this.m_X; Renderer.eOffsetY += this.m_Y; }
public void WriteSignature() { if (this.m_Signature == null) { return; } this.m_Signature.Visible = true; this.m_SignatureAnimation = new TimeSync(0.5); }
private GDynamicMessage(bool unremovable, IMessageOwner owner, string text, IFont font, IHue hue, float duration) : base(text, font, hue, Hues.Load(53), 0, 0, (OnClick)null) { this.m_Unremovable = unremovable; this.m_OverridesCursor = false; this.m_Owner = owner; this.m_SolidDuration = duration; this.m_Dispose = new TimeSync((double)this.m_SolidDuration + 1.0); }
public GSystemMessage(string text, IFont font, IHue hue, float duration) : base(text, font, hue, 0, 0) { this.m_OverridesCursor = false; this.m_SolidDuration = duration; this.m_Dispose = new TimeSync((double)this.m_SolidDuration + 1.0); this.m_UpdateTime = DateTime.Now; this.m_DupeCount = 1; this.m_OrigText = text; }
public GObjectProperties(int number, object o, ObjectPropertyList propList) : base(0, 0, 2, 20) { this.m_Object = o; this.m_CanDrag = false; this.m_Timer = new Timer(new OnTick(this.Roll_OnTick), 0); this.m_Timer.Start(false); int num = propList.Properties.Length; if (num == 0 && number != -1) { num = 1; } this.SetList(number, propList); this.m_WidthDuration = (double)this.m_TotalWidth * 0.000625; this.m_HeightDuration = (double)num * (1.0 / 80.0); this.m_Sync = new TimeSync(this.m_WidthDuration + this.m_HeightDuration); }
public override void OnStart() { this._sync = new TimeSync(0.5); this.m_Start = Renderer.m_Frames; }
private void Initialize(Mobile m, int NewX, int NewY, int NewZ, int NewDir) { this.m_Mobile = m; this.m_NewX = NewX; this.m_NewY = NewY; this.m_NewZ = NewZ; this.m_NewDir = NewDir; int num1 = 0; int num2 = 0; int num3 = 0; if (m.Walking.Count == 0) { num1 = m.X; num2 = m.Y; num3 = m.Z; } else { IEnumerator enumerator = m.Walking.GetEnumerator(); WalkAnimation walkAnimation = (WalkAnimation)null; while (enumerator.MoveNext()) { walkAnimation = (WalkAnimation)enumerator.Current; } if (walkAnimation != null) { num1 = walkAnimation.m_NewX; num2 = walkAnimation.m_NewY; num3 = walkAnimation.m_NewZ; } } if (!m.Player) { m.Direction = (byte)NewDir; } this.m_Advance = false; this.m_Sync = (TimeSync)null; if (num1 != NewX || num2 != NewY || num3 != NewZ) { int num4 = NewX - num1; int num5 = NewY - num2; int num6 = NewZ - num3; int num7 = (num4 - num5) * 22; int num8 = (num4 + num5) * 22 - num6 * 4; this.m_X = num7; this.m_Y = num8; int idx = NewDir >> 7 & 1; int speed = m.Speed; if (idx == 1) { speed *= 2; } this.m_Duration = Walking.Speed / (float)speed; this.m_Frames = (float)WalkAnimation.GetFrames(m.IsMounted, idx); } else { this.m_X = 0; this.m_Y = 0; this.m_Duration = 0.1f; this.m_Frames = 0.0f; } }
public void Dispose() { this.m_Disposing = true; this.m_Sync = new TimeSync(1.0); }