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; }
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); }
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; }
public ClickHandler GetClickHandlerCreature(Creature cr) { MobClickHandler.Instance.prototype = cr; return MobClickHandler.Instance; }
public void AddCreature(Creature creature) { creatures.Add(creature); }