コード例 #1
0
        public override void OnTickIdle(ObjNPC npc, float delta)
        {
            if (!npc.CanMove())
            {
                return;
            }

            if (npc.IsMoving())
            {
                return;
            }

            if (mPtIdx < 0 || mPtIdx >= ListDestination.Count)
            {
                npc.Disapeare();
                return;
            }

            if (mTime > DateTime.Now)
            {
                return;
            }

            if (MoveResult.AlreadyThere == npc.MoveTo(ListDestination[mPtIdx]))
            {
                mPtIdx++;
                mTime = DateTime.Now.AddSeconds(WaitTime);
            }
        }