public MapPalletScene(Panel panel, MapChipResourceManager mcrm, SelectMapChipScene sms) : base(panel) { mouseSwap = new MouseSwap(); this.mcrm = mcrm; panel.MouseDown += MouseClickAction; panel.MouseMove += MouseDrag; this.sms = sms; mapPalletData = new MapPalletData(); localPos.SetVect(0, 0); AddChild(new MapGrid(this, 40), 1); }
//Startで登録したマス座標にあるmapChipを任意のマス座標にあるmapChipと入れ替え public void Move(Point point, MapPalletData mapPalletData, MapChipResourceManager mcrm) { if (tempPoint2 == point) { return; } if (tempPoint == point) { mapPalletData.SwapMapChip(tempPoint2.X, tempPoint2.Y, tempPoint.X, tempPoint.Y, mcrm); tempPoint2 = point; return; } mapPalletData.SwapMapChip(point.X, point.Y, tempPoint2.X, tempPoint2.Y, mcrm); mapPalletData.SwapMapChip(tempPoint2.X, tempPoint2.Y, tempPoint.X, tempPoint.Y, mcrm); tempPoint2 = point; }