Пример #1
0
        // createBlueprintScrap
        public BlueprintScrap createBlueprintScrap(Blueprint blueprint, string uid)
        {
            // Check unsaved resources
            if (isUnsavedResourceUsed(uid))
            {
                System.Windows.Forms.MessageBox.Show(String.Format("An unsaved resource with the uid [{0}] already exists.", uid), "Blueprint Error", System.Windows.Forms.MessageBoxButtons.OK);
                return null;
            }

            BlueprintScrap scrap = new BlueprintScrap(uid);
            blueprint.scraps.Add(scrap);
            return scrap;
        }
Пример #2
0
 // Create from xml
 public BlueprintSocket(XElement data, BlueprintScrap scrapA, BlueprintScrap scrapB)
 {
     _relativePoint = Loader.loadVector2(data.Attribute("relative_point"), Vector2.Zero);
     _scrapA        = scrapA;
     _scrapB        = scrapB;
 }
Пример #3
0
 // selectBlueprintScrap
 public void selectBlueprintScrap(BlueprintScrap scrap)
 {
     scrapList.SelectedIndex = selectedBlueprint.scraps.IndexOf(scrap);
 }
Пример #4
0
 // Create new
 public BlueprintSocket(BlueprintScrap scrapA, BlueprintScrap scrapB, Vector2 relativePoint)
 {
     _relativePoint = relativePoint;
     _scrapA        = scrapA;
     _scrapB        = scrapB;
 }
Пример #5
0
 // Create from xml
 public BlueprintSocket(XElement data, BlueprintScrap scrapA, BlueprintScrap scrapB)
 {
     _relativePoint = Loader.loadVector2(data.Attribute("relative_point"), Vector2.Zero);
     _scrapA = scrapA;
     _scrapB = scrapB;
 }
Пример #6
0
 // Create new
 public BlueprintSocket(BlueprintScrap scrapA, BlueprintScrap scrapB, Vector2 relativePoint)
 {
     _relativePoint = relativePoint;
     _scrapA = scrapA;
     _scrapB = scrapB;
 }
Пример #7
0
 // connectScrap
 public void connectScrap(BlueprintScrap scrap)
 {
     _connected.Add(scrap);
 }
Пример #8
0
 // connectScrap
 public void connectScrap(BlueprintScrap scrap)
 {
     _connected.Add(scrap);
 }