public HNodeDecoUpdated(LevelSession parent, Decoration oldDeco, Decoration newDeco, int index, DECO_CATEGORY list) : base(parent) { this.oldDeco = oldDeco; this.newDeco = newDeco; this.index = index; this.list = list; }
/// <summary> /// Replaces a Decoration /// </summary> public void updateDeco(DECO_CATEGORY category, int index, Decoration newDeco) { List <Decoration> l = getDecoList(category); Decoration oldDeco = l[index]; l[index] = newDeco; historyStack.Add(new HNodeDecoUpdated(this, oldDeco, newDeco, index, category)); }
public string getDecoCString(DECO_CATEGORY t) { switch (t) { case DECO_CATEGORY.GENERIC: return("Decoration"); case DECO_CATEGORY.BACK: return("BackDecoration"); case DECO_CATEGORY.FRONT: return("FrontDecoration"); case DECO_CATEGORY.UNK: return("UnknownDecoration"); } return("Decoration"); }
private List <Decoration> getDecoList(DECO_CATEGORY t) { switch (t) { case DECO_CATEGORY.GENERIC: return(decos); case DECO_CATEGORY.BACK: return(decosBack); case DECO_CATEGORY.FRONT: return(decosFront); case DECO_CATEGORY.UNK: return(decosUnk); } //Ooof??? return(decos); }
/// <summary> /// Returns a copy /// </summary> public Decoration getDeco(DECO_CATEGORY category, int index) { return(getDecoList(category)[index]); }