コード例 #1
0
        protected void OnEnterComplete(Actor self, Actor targetActor)
        {
            self.World.AddFrameEndTask(w =>
            {
                if (self.IsDead)
                {
                    return;
                }

                // Make sure the target hasn't changed while entering
                // OnEnterComplete is only called if targetActor is alive
                if (targetActor != enterActor)
                {
                    return;
                }

                if (!enterGarrison.CanLoad(enterActor, self))
                {
                    return;
                }

                enterGarrison.Load(enterActor, self);
                w.Remove(self);
            });
        }