public override void Update() { Rectangle rectangle = new Rectangle(0, 0, 32, 48); rectangle.Inflate(1600, 1600); int x = rectangle.X; int y = rectangle.Y; if (this.npc != -1) { if (Main.npc[this.npc].active && Main.npc[this.npc].type == 488 && ((double)Main.npc[this.npc].ai[0] == (double)this.Position.X && (double)Main.npc[this.npc].ai[1] == (double)this.Position.Y)) { return; } this.Deactivate(); } else { TETrainingDummy.FillPlayerHitboxes(); rectangle.X = (int)this.Position.X * 16 + x; rectangle.Y = (int)this.Position.Y * 16 + y; bool flag = false; foreach (KeyValuePair <int, Rectangle> keyValuePair in TETrainingDummy.playerBox) { if (keyValuePair.Value.Intersects(rectangle)) { flag = true; break; } } if (!flag) { return; } this.Activate(); } }
// Token: 0x06000F9B RID: 3995 RVA: 0x003F61E4 File Offset: 0x003F43E4 public override void Update() { Rectangle rectangle = new Rectangle(0, 0, 32, 48); rectangle.Inflate(1600, 1600); int x = rectangle.X; int y = rectangle.Y; if (this.npc != -1) { if (!Main.npc[this.npc].active || Main.npc[this.npc].type != 488 || Main.npc[this.npc].ai[0] != (float)this.Position.X || Main.npc[this.npc].ai[1] != (float)this.Position.Y) { this.Deactivate(); return; } } else { TETrainingDummy.FillPlayerHitboxes(); rectangle.X = (int)(this.Position.X * 16) + x; rectangle.Y = (int)(this.Position.Y * 16) + y; bool flag = false; foreach (KeyValuePair <int, Rectangle> current in TETrainingDummy.playerBox) { if (current.Value.Intersects(rectangle)) { flag = true; break; } } if (flag) { this.Activate(); } } }