Пример #1
0
 public void AddPrototype(string path,bool isbase)
 {
     string name =Path.GetFileName(path);
     Texture t = new Texture(name.GetHashCode(), 0, Path.Combine(path,avatar), isbase);
     prototypes[name] = new Creature(new System.Drawing.Point(0, 0), t,name);
     prototypes[name].Path = path;
 }
Пример #2
0
 public override void Click(System.Drawing.Point p)
 {
     Creature creature = new Creature(p, prototype.Avatar, prototype.Name);
     if (EditorEngine.Instance.CreaturesManager.ExistCreatureInField(p))
     {
         EditorEngine.Instance.CreaturesManager.RemoveCreature(p);
     }
     else
         EditorEngine.Instance.CreaturesManager.AddCreature(creature);
 }
Пример #3
0
 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;
 }
Пример #4
0
 public ClickHandler GetClickHandlerCreature(Creature cr)
 {
     MobClickHandler.Instance.prototype = cr;
     return MobClickHandler.Instance;
 }
Пример #5
0
 public void AddCreature(Creature creature)
 {
     creatures.Add(creature);
 }