예제 #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);
 }