Terraria.Netplay.GetSectionX C# (CSharp) Method

GetSectionX() public static method

public static GetSectionX ( int x ) : int
x int
return int
        public static int GetSectionX(int x)
        {
            return x / 200;
        }

Usage Example

Exemplo n.º 1
0
 public bool SectionRange(int size, int firstX, int firstY)
 {
     for (int index = 0; index < 4; ++index)
     {
         int x = firstX;
         int y = firstY;
         if (index == 1)
         {
             x += size;
         }
         if (index == 2)
         {
             y += size;
         }
         if (index == 3)
         {
             x += size;
             y += size;
         }
         if (this.TileSections[Netplay.GetSectionX(x), Netplay.GetSectionY(y)])
         {
             return(true);
         }
     }
     return(false);
 }
All Usage Examples Of Terraria.Netplay::GetSectionX