예제 #1
0
        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;
            }
        }
예제 #2
0
        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;
        }
예제 #3
0
 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;
     }
 }