Ejemplo n.º 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)));
    }
Ejemplo n.º 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)));
    }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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)));
     }
 }
Ejemplo n.º 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)));
     }
 }
Ejemplo n.º 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)));
     }
 }
Ejemplo n.º 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);
    }
Ejemplo n.º 8
0
 public static Rect GetHPTextureRect(int width)
 {
     return(AutoRect.AutoTex(new Rect(GameUITexturePosition.HPImage.xMin, GameUITexturePosition.HPImage.yMin, width, GameUITexturePosition.HPImage.height)));
 }
Ejemplo n.º 9
0
 public static Rect GetAvatarLogoRect(int avatarLogoIndex)
 {
     return(AutoRect.AutoTex(new Rect(avatarLogoIndex % 4 * 116, 336 + avatarLogoIndex / 4 * 81 + 512, 116, 81)));
 }