int CalculateConsoleY(int y) { int cy = y; ConsoleSpirit superSpirit = _superSpirit; while (superSpirit != null) { cy += superSpirit._frame.origin.y; superSpirit = superSpirit._superSpirit; } return(cy); }
public void AddSubSpirit(ConsoleSpirit subSpirit) { if (this == subSpirit) { return; } subSpirit._superSpirit = this; subSpirit.Frame = subSpirit.Frame; subSpirit.OldFrame = subSpirit.OldFrame; this._subSpirits.Add(subSpirit); }
int CalculateConsoleX(int x) { int cx = x; ConsoleSpirit superSpirit = _superSpirit; while (superSpirit != null) { cx += superSpirit._frame.origin.x; superSpirit = superSpirit._superSpirit; } return(cx); }
public void RemoveFromSuperSpirit() { ConsoleSpirit superSp = this._superSpirit; if (superSp != null) { superSp._subSpirits.Remove(this); this._superSpirit = null; superSp.DrawSelf(); } else { this.Clear(); } }
public void addSpirit(ConsoleSpirit spirit) { spirits.Add(spirit); }