コード例 #1
0
ファイル: MapCommand.cs プロジェクト: lltcggie/StageMapEditor
        public MapCommand(MapModel model, MapSelect mapSelect)
        {
            var mapCommand = mapSelect.GetSelectPointArray().Select(p => new MapChipPoint(p, model.MapChipModel.Get(p)));
            var objCommand = mapSelect.GetSelectPointArray().Select(p => new ObjectChipPoint(p, model.ObjectChipModel.Get(p)));

            MapChipCommand = new MapChipCommand(mapCommand);
            ObjectChipCommand = new ObjectChipCommand(objCommand);
        }
コード例 #2
0
ファイル: MapCommand.cs プロジェクト: lltcggie/StageMapEditor
        public MapCommand(IEnumerable<IMapCommand> commandPool)
        {
            if (commandPool == null) return;

            var commands = commandPool.ToArray();
            var mapComamnd = commands.SelectMany(x => x.MapChipCommand.MapChipPointList);
            var objComamnd = commands.SelectMany(x => x.ObjectChipCommand.ObjectChipPointList);

            MapChipCommand = new MapChipCommand(mapComamnd);
            ObjectChipCommand = new ObjectChipCommand(objComamnd);
        }
コード例 #3
0
ファイル: MapCommand.cs プロジェクト: lltcggie/StageMapEditor
        public MapCommand(Point point, MapModel model, MapSelect mapSelect)
        {
            //�lj��ꏊ���I��͈͂Ȃ�΁A���͈̔͂�L�^�����R�}���h�𐶐�
            if (mapSelect.Contains(point))
            {
                var mapCommand = mapSelect.GetMapChipList(model.MapChipModel);
                var objCommand = mapSelect.GetObjectChipList(model.ObjectChipModel);

                MapChipCommand = new MapChipCommand(mapCommand);
                ObjectChipCommand = new ObjectChipCommand(objCommand);
            }
            else
            {
                MapChipCommand = new MapChipCommand(point, model.MapChipModel.Get(point));
                ObjectChipCommand = new ObjectChipCommand(point, model.ObjectChipModel.Get(point));
            }
        }
コード例 #4
0
ファイル: MapCommand.cs プロジェクト: lltcggie/StageMapEditor
        public MapCommand(MapModel model, Clipboard clipBoard)
        {
            var pasteArea = clipBoard.GetPasteSelectArea(model);

            var mapCommand = pasteArea.Select(p => new MapChipPoint(p, model.MapChipModel.Get(p))).ToArray();
            var objCommand = pasteArea.Select(p => new ObjectChipPoint(p, model.ObjectChipModel.Get(p))).ToArray();

            MapChipCommand = new MapChipCommand(mapCommand);
            ObjectChipCommand = new ObjectChipCommand(objCommand);
        }
コード例 #5
0
ファイル: MapCommand.cs プロジェクト: lltcggie/StageMapEditor
 /// <summary>
 /// ����̒n�_��MapCommand��쐬����
 /// </summary>
 /// <param name="point"></param>
 /// <param name="model"></param>
 public MapCommand(Point point, MapModel model)
 {
     MapChipCommand = new MapChipCommand(point, model.MapChipModel.Get(point));
     ObjectChipCommand = new ObjectChipCommand(point, model.ObjectChipModel.Get(point));
 }