Пример #1
0
    public static Rect GetIAPLogoRect(int index)
    {
        int x = index % 4;
        int y = index / 4;

        return(AutoRect.AutoTex(new Rect(x * 252, y * 354, 252, 354)));
    }
Пример #2
0
    public static Rect GetWeaponIconTextureRect(int index)
    {
        int x = 112 * (index % 4);
        int y = 112 * (index / 4);

        return(AutoRect.AutoTex(new Rect(x, y, 112, 112)));
    }
Пример #3
0
 public static void InitLogosTexturePos()
 {
     for (int i = 0; i < AvatarTexturePosition.AvatarLogo.Length; i++)
     {
         int x = i % 2;
         int y = i / 2;
         AvatarTexturePosition.AvatarLogo[i] = AutoRect.AutoTex(new Rect(x * 448, y * 200, 448, 200));
     }
 }
Пример #4
0
 public static Rect GetWeaponLogoRect(int weaponLogoIndex)
 {
     if (weaponLogoIndex == 12)
     {
         return(AutoRect.AutoTex(new Rect(808, 124, 194, 112)));
     }
     else
     {
         return(AutoRect.AutoTex(new Rect(weaponLogoIndex % 5 * 194, weaponLogoIndex / 5 * 112 + 512, 194, 112)));
     }
 }
Пример #5
0
 public static Rect GetBulletsLogoRect(int index)
 {
     if (index == (int)WeaponType.Saw)
     {
         return(new Rect(0, 0, 0, 0));
     }
     else
     {
         return(AutoRect.AutoTex(new Rect(44 * (index - 1), 308, 44, 52)));
     }
 }
Пример #6
0
 public static Rect GetNumberRect(int n)
 {
     if (n >= 0)
     {
         int row = n / 3;
         int col = n % 3;
         return(AutoRect.AutoTex(new Rect(59 * col, 198 + 76 * row, 59, 76)));
     }
     else
     {
         return(AutoRect.AutoTex(new Rect(0, 0, 0, 0)));
     }
 }
Пример #7
0
    public static TexturePosInfo GetWeaponTextureRect(int index)
    {
        TexturePosInfo info = new TexturePosInfo();

        if (index < 10)
        {
            info.m_Material = UIResourceMgr.GetInstance().GetMaterial("Weapons");

            int x = 438 * (index % 2);
            int y = 192 * (index / 2);
            info.m_TexRect = AutoRect.AutoTex(new Rect(x, y, 438, 192));
        }
        else
        {
            info.m_Material = UIResourceMgr.GetInstance().GetMaterial("Weapons2");
            index          -= 10;
            int x = 438 * (index % 2);
            int y = 192 * (index / 2);
            info.m_TexRect = AutoRect.AutoTex(new Rect(x, y, 438, 192));
        }

        return(info);
    }
Пример #8
0
 public static Rect GetHPTextureRect(int width)
 {
     return(AutoRect.AutoTex(new Rect(GameUITexturePosition.HPImage.xMin, GameUITexturePosition.HPImage.yMin, width, GameUITexturePosition.HPImage.height)));
 }
Пример #9
0
 public static Rect GetAvatarLogoRect(int avatarLogoIndex)
 {
     return(AutoRect.AutoTex(new Rect(avatarLogoIndex % 4 * 116, 336 + avatarLogoIndex / 4 * 81 + 512, 116, 81)));
 }