// 移动角色位置 public void MoveWarroirs(Warrior warrior, int tx, int ty) { warrior.GetPosInMap(out int fx, out int fy); if (fx == tx && fy == ty) { return; } Debug.Assert(!map.BlockedAt(tx, ty, warrior.StandableTiles), "target position has been blocked: " + tx + ", " + ty); Map.SetObjAt(fx, fy, null); Map.SetObjAt(tx, ty, warrior); }