public void Attach() { if (((this.owner != 0) && (this.owner.handle.shape != null)) && ((this.owner.handle.TheActorMeta.ActorType != ActorTypeDef.Invalid) && !this.attached)) { SceneManagement instance = Singleton <SceneManagement> .GetInstance(); instance.GetCoord(ref this.coord, this.owner.handle.shape); instance.AddToTile(this, ref this.coord); this.dirty = false; this.attached = true; } }
public void Attach() { if (!this.owner || this.owner.handle.shape == null || this.owner.handle.TheActorMeta.ActorType == ActorTypeDef.Invalid || this.attached) { return; } SceneManagement instance = Singleton <SceneManagement> .GetInstance(); instance.GetCoord(ref this.coord, this.owner.handle.shape); instance.AddToTile(this, ref this.coord); this.dirty = false; this.attached = true; }
public void Update() { if (this.dirty && this.owner && this.owner.handle.shape != null) { SceneManagement instance = Singleton <SceneManagement> .instance; SceneManagement.Coordinate coordinate = default(SceneManagement.Coordinate); instance.GetCoord(ref coordinate, this.owner.handle.shape); if (!this.coord.Equals(ref coordinate)) { instance.RemoveFromTile(this, ref this.coord); this.coord = coordinate; instance.AddToTile(this, ref this.coord); } this.dirty = false; } }