示例#1
0
        public void Redo(EditorController ec)
        {
            ec.DoRemoveLine(sx, sy);
            List <GameObject> removedObject = new List <GameObject>();

            foreach (Transform eo in ec.level.objectsDomain)
            {
                if (!ec.level.IsValidCoord((int)eo.position.x, (int)eo.position.y))
                {
                    removedObject.Add(eo.gameObject);
                }
            }
            foreach (var eo in removedObject)
            {
                ICommand command = new RemoveObjectCommand(eo.gameObject);
                command.Redo(ec);
                commands.Push(command);
            }
        }
示例#2
0
 public void Undo(EditorController ec)
 {
     ec.DoRemoveLine(sx, sy);
 }