Exemplo n.º 1
0
 private bool CheckHorizontalCells(CPlayer plr, Cell centre, Cell self)
 {
     if (centre.Left == self)
     {
         plr.Data.AbsoluteX += plr.Data.Speed;
         return(false);
     }
     if (centre.Right == self)
     {
         plr.Data.AbsoluteX -= plr.Data.Speed;
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 private bool CheckVerticalCells(CPlayer plr, Cell centre, Cell self)
 {
     if (centre.Up == self)
     {
         plr.Data.AbsoluteY += plr.Data.Speed;
         return(false);
     }
     if (centre.Down == self)
     {
         plr.Data.AbsoluteY -= plr.Data.Speed;
         return(false);
     }
     return(true);
 }