public void AddPrototypeWithLoad(string path, bool isbase)
 {
     string name = Path.GetFileName(path);
     if (prototypes.ContainsKey(name))
     {
         prototypes[name].Remove();
     }
     Texture t = new Texture(name.GetHashCode(), 0, Path.Combine(path, avatar), isbase);
     t.Load();
     prototypes[name] = new Creature(new System.Drawing.Point(0, 0), t, name);
     prototypes[name].Path = path;
 }
Exemple #2
0
        private void loadSpecials()
        {
            Texture start = new Texture(START, 0, Path.Combine(basepath, specialTextures, startPositionTexture), true);
            start.Load();

            specials[START] = start;

            Texture trigger = new Texture(TRIGGER, 0, Path.Combine(basepath, specialTextures, triggerImage), true);
            trigger.Load();
            specials[TRIGGER] = trigger;
        }
Exemple #3
0
        public void SetBackground(string filename)
        {
            Bitmap temp = new Bitmap(filename);
            backBit = temp;//Utils.InteligentResize(temp);
            if (backgraundOn)
            {
                specials[BACKGROUND].Remove();

            }
            Texture txt = new Texture(BACKGROUND, 0, filename, true);
            txt.Load();
            specials[BACKGROUND] = txt;
            backgraundOn = true;
        }
Exemple #4
0
 private void LoadBackground()
 {
     Texture background = new Texture(BACKGROUND, 0, Path.Combine(mapfolder, Map.background), true);
     background.Load();
     specials[BACKGROUND] = background;
     backgraundOn = true;
     backBit = background.Bmp;
 }
Exemple #5
0
 private void buttonAddTile_Click(object sender, EventArgs e)
 {
     using (AddTile at = new AddTile())
     {
         if (at.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             Texture t = new Texture(getNewId()+1, 0, null, false);
             EditorEngine.Instance.Map.textures[t.IdTexture] = t;
             t.Bmp = at.picture;
             t.Load();
             il.Images.Add(t.Bmp);
             ListViewItem item = new ListViewItem("Own", indexImage++);
             item.Tag = t;
             listViewTiles.Items.Add(item);
         }
     }
 }