Beispiel #1
0
        int CalculateConsoleY(int y)
        {
            int           cy          = y;
            ConsoleSpirit superSpirit = _superSpirit;

            while (superSpirit != null)
            {
                cy         += superSpirit._frame.origin.y;
                superSpirit = superSpirit._superSpirit;
            }
            return(cy);
        }
Beispiel #2
0
        public void AddSubSpirit(ConsoleSpirit subSpirit)
        {
            if (this == subSpirit)
            {
                return;
            }
            subSpirit._superSpirit = this;
            subSpirit.Frame        = subSpirit.Frame;

            subSpirit.OldFrame = subSpirit.OldFrame;
            this._subSpirits.Add(subSpirit);
        }
Beispiel #3
0
        int CalculateConsoleX(int x)
        {
            int           cx          = x;
            ConsoleSpirit superSpirit = _superSpirit;

            while (superSpirit != null)
            {
                cx         += superSpirit._frame.origin.x;
                superSpirit = superSpirit._superSpirit;
            }
            return(cx);
        }
Beispiel #4
0
        public void RemoveFromSuperSpirit()
        {
            ConsoleSpirit superSp = this._superSpirit;

            if (superSp != null)
            {
                superSp._subSpirits.Remove(this);
                this._superSpirit = null;
                superSp.DrawSelf();
            }
            else
            {
                this.Clear();
            }
        }
Beispiel #5
0
 public void addSpirit(ConsoleSpirit spirit)
 {
     spirits.Add(spirit);
 }