示例#1
0
 public override void Logic()
 {
     CreaturesContainer.MovingLogic();
     AttacksContainer.Logic();
     NetContainer.Logic();
     mainWorld.Logic(curPlayer);
 }
示例#2
0
        public override void Render(RLConsole mainConsole)
        {
            RLConsole.Blit(statsConsole, 0, 0, statsConsoleRect.Size.X, statsConsoleRect.Size.Y,
                           mainConsole, statsConsoleRect.Pos.X, statsConsoleRect.Pos.Y);
            RLConsole.Blit(worldConsole, 0, 0, worldConsoleRect.Size.X, worldConsoleRect.Size.Y,
                           mainConsole, worldConsoleRect.Pos.X, worldConsoleRect.Pos.Y);

            mainWorld.Render(worldConsole);
            CreaturesContainer.RenderLogic(worldConsole);
            AttacksContainer.Render(worldConsole);
            mainHud.Render(statsConsole);
        }
示例#3
0
        public Attack(AttackType tp, Vector frm, Vector t, int dmg, Creature crea, List <Vector> zone)
        {
            this.type   = tp;
            this.from   = frm;
            this.to     = t;
            this.damage = dmg;

            this.parent = crea;

            var dir = to;

            for (int i = 0; i < zone.Count; i++)
            {
                this.realPos.Add(this.RotateVector(zone[i], dir) + from + to);
            }

            AttacksContainer.Add(this);
            var timer = new Timer("attack", ticks, () => { AttacksContainer.Remove(this); });
        }