コード例 #1
0
ファイル: Main.cs プロジェクト: UnforeseenOcean/Warmode
    private void LoadAvatar()
    {
        if (!Steam.active || !Steam.logged)
        {
            Main.avatar = TEX.GetTextureByName("black");
            return;
        }
        byte[] array        = new byte[16384];
        bool   mediumAvatar = Steam.GetMediumAvatar(array, 16384);

        if (mediumAvatar)
        {
            Main.avatar = new Texture2D(64, 64, TextureFormat.RGBA32, false, true);
            Main.avatar.LoadRawTextureData(array);
            for (int i = 0; i < 64; i++)
            {
                for (int j = 0; j < 32; j++)
                {
                    Color pixel = Main.avatar.GetPixel(i, j);
                    Main.avatar.SetPixel(i, j, Main.avatar.GetPixel(i, 63 - j));
                    Main.avatar.SetPixel(i, 63 - j, pixel);
                }
            }
            Main.avatar.Apply(false);
        }
    }
コード例 #2
0
    public static void CreateWeapon(int wid, int bwid)
    {
        GameObject gameObject = ContentLoader_.LoadGameObject("p_" + MenuShop.shopdata[wid].name2);

        if (gameObject != null)
        {
            GameObject gameObject2 = UnityEngine.Object.Instantiate(gameObject, Vector3.zero, Quaternion.identity) as GameObject;
            GameObject gameObject3 = GameObject.Find(MenuPlayer.goPlayer.name + "/Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 Spine1/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand");
            gameObject2.transform.parent        = gameObject3.transform;
            gameObject2.transform.localPosition = gameObject.transform.localPosition;
            gameObject2.transform.localRotation = gameObject.transform.localRotation;
            if (MenuShop.currData != null && MenuShop.currData.section == 5 && wid >= 1 && wid <= 25)
            {
                Component[] componentsInChildren = gameObject2.GetComponentsInChildren(typeof(Renderer));
                for (int i = 0; i < componentsInChildren.Length; i++)
                {
                    Renderer renderer = (Renderer)componentsInChildren[i];
                    renderer.materials[0].SetTexture(0, TEX.GetTextureByName(MenuShop.currData.iconname));
                }
            }
        }
        GameObject gameObject4 = ContentLoader_.LoadGameObject("b_" + MenuShop.shopdata[bwid].name2);

        if (gameObject != null)
        {
            GameObject gameObject5 = UnityEngine.Object.Instantiate(gameObject4, Vector3.zero, Quaternion.identity) as GameObject;
            GameObject gameObject6 = GameObject.Find(MenuPlayer.goPlayer.name + "/Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 Spine1");
            gameObject5.transform.parent        = gameObject6.transform;
            gameObject5.transform.localPosition = gameObject4.transform.localPosition;
            gameObject5.transform.localRotation = gameObject4.transform.localRotation;
        }
    }
コード例 #3
0
 public void PostAwake()
 {
     this.trPlayer         = GameObject.Find("LocalPlayer").transform;
     this.tBlack           = TEX.GetTextureByName("black");
     this.tWhite           = TEX.GetTextureByName("white");
     this.tGray0           = TEX.GetTextureByName("gray0");
     this.tGray2           = TEX.GetTextureByName("gray2");
     this.tRed             = TEX.GetTextureByName("red");
     this.tMoney           = TEX.GetTextureByName("wartab_money");
     this.tYellow          = TEX.GetTextureByName("yellow");
     this.tLock            = TEX.GetTextureByName("lock");
     this.tGradient        = TEX.GetTextureByName("GUI/left_gradient");
     this.tKeyBuy          = TEX.GetTextureByName("GUI/keybuy");
     this.tLoad            = TEX.GetTextureByName("wmload");
     this.sCategoryName[1] = Lang.Get("_PISTOLS");
     this.sCategoryName[2] = Lang.Get("_SHOTGUNS");
     this.sCategoryName[3] = Lang.Get("_SUBMACHUNE_GUNS");
     this.sCategoryName[4] = Lang.Get("_ASSAULT_RIFLES");
     this.sCategoryName[5] = Lang.Get("_SNIPER_RIFLES");
     this.sCategoryName[6] = Lang.Get("_HEAVY_RIFLES");
     this.sCategoryName[7] = Lang.Get("_AMMUNITION");
     this.teamcolor[0]     = new Color(1f, 0.2f, 0f, 1f);
     this.teamcolor[1]     = new Color(0f, 0.5f, 1f, 1f);
     this.OnResize();
     BuyMenu.show = false;
 }
コード例 #4
0
 public void PostAwake()
 {
     Message.tBlack    = TEX.GetTextureByName("black");
     Message.tRed      = TEX.GetTextureByName("red");
     Message.tWhite    = TEX.GetTextureByName("white");
     Message.tHeadshot = TEX.GetTextureByName("headshot_icon");
     Message.tGradient = new Texture2D(64, 32);
     for (int i = 0; i < 64; i++)
     {
         for (int j = 0; j < 32; j++)
         {
             Message.tGradient.SetPixel(i, j, new Color(1f, 1f, 1f, (float)(64 - i) / 64f));
         }
     }
     Message.tGradient.filterMode = FilterMode.Point;
     Message.tGradient.Apply(true);
     Message.tEmptyBack = TEX.GetTextureByName("warbadge_hor_empty");
     this.OnResize();
     Message.chat.Clear();
     Message.system.Clear();
     Message.death.Clear();
     Message.sMessage[0] = Lang.Get("_FULLTEAM");
     Message.sMessage[1] = Lang.Get("_PREPARE");
     Message.sMessage[2] = Lang.Get("_МERCS_WIN");
     Message.sMessage[3] = Lang.Get("_WARCORPS_WIN");
     Message.sMessage[4] = Lang.Get("_DRAW");
     Message.sMessage[5] = Lang.Get("_TEAM_NOT_BALANCED");
     Message.sMessage[6] = Lang.Get("_WARMUP_ENDED");
     Message.HideBombPlantedMsg();
     Message.tAttention = TEX.GetTextureByName("BombMsg_01");
 }
コード例 #5
0
ファイル: Chat.cs プロジェクト: UnforeseenOcean/Warmode
 public void PostAwake()
 {
     this.tBlack   = TEX.GetTextureByName("black");
     this.tTeam[0] = TEX.GetTextureByName("red");
     this.tTeam[1] = TEX.GetTextureByName("blue");
     this.OnResize();
 }
コード例 #6
0
 public static void Init()
 {
     foreach (KeyValuePair <int, CWeaponData> current in WeaponData.weapons)
     {
         current.Value.fire1 = SND.GetSoundByName("weapon/" + current.Value.wName.ToLower() + "_fire1");
         current.Value.icon  = TEX.GetTextureByName("weapon_" + current.Value.wName.ToLower());
         if (current.Value.icon == null)
         {
             Debug.Log("[TEX] can't load: weapon_" + current.Value.wName.ToLower());
         }
         if (current.Value.icon)
         {
             int width  = current.Value.icon.width;
             int height = current.Value.icon.height;
             current.Value.icon2_inverted = new Texture2D(width, height, TextureFormat.RGBA32, false);
             current.Value.icon2          = new Texture2D(width, height, TextureFormat.RGBA32, false);
             for (int i = 0; i < width; i++)
             {
                 for (int j = 0; j < height; j++)
                 {
                     current.Value.icon2.SetPixel(width - i, j, new Color(1f, 1f, 1f, current.Value.icon.GetPixel(i, j).a));
                     current.Value.icon2_inverted.SetPixel(i, j, new Color(1f, 1f, 1f, current.Value.icon.GetPixel(i, j).a));
                 }
             }
             current.Value.icon2.Apply(true);
             current.Value.icon2_inverted.Apply(true);
         }
     }
 }
コード例 #7
0
 public void PostAwake()
 {
     ScoreBoard.tWhite       = TEX.GetTextureByName("white");
     ScoreBoard.tBlack       = TEX.GetTextureByName("black");
     ScoreBoard.tGray0       = TEX.GetTextureByName("gray0");
     ScoreBoard.tGray1       = TEX.GetTextureByName("gray1");
     ScoreBoard.tGray2       = TEX.GetTextureByName("gray2");
     ScoreBoard.tRed         = TEX.GetTextureByName("red");
     ScoreBoard.tBlue        = TEX.GetTextureByName("blue");
     ScoreBoard.tClan        = TEX.GetTextureByName("GUI/wartab_clan");
     ScoreBoard.tKills       = TEX.GetTextureByName("GUI/wartab_kills");
     ScoreBoard.tDeaths      = TEX.GetTextureByName("GUI/wartab_deaths");
     ScoreBoard.tPoints      = TEX.GetTextureByName("GUI/wartab_points");
     ScoreBoard.tWeapon      = TEX.GetTextureByName("GUI/wartab_guns");
     ScoreBoard.tMoney       = TEX.GetTextureByName("GUI/wartab_money");
     ScoreBoard.tBomb        = TEX.GetTextureByName("GUI/c4_orange");
     ScoreBoard.tGP          = TEX.GetTextureByName("GUI/gp_64");
     ScoreBoard.tExp         = TEX.GetTextureByName("GUI/wartab_exp");
     ScoreBoard.tLine        = TEX.GetTextureByName("GUI/warline");
     ScoreBoard.teamcolor[0] = 2;
     ScoreBoard.teamcolor[1] = 4;
     ScoreBoard.show         = false;
     ScoreBoard.showforce    = false;
     this.OnResize();
 }
コード例 #8
0
 public void PostAwake()
 {
     TopBar.tBlack  = TEX.GetTextureByName("black");
     TopBar.tOrange = TEX.GetTextureByName("orange");
     TopBar.tBlue   = TEX.GetTextureByName("lightblue");
     TopBar.tGreen  = TEX.GetTextureByName("green");
     this.OnResize();
 }
コード例 #9
0
 public void LoadEnd()
 {
     MenuServers.tBlack  = TEX.GetTextureByName("black");
     MenuServers.tOrange = TEX.GetTextureByName("orange");
     MenuServers.tGray   = TEX.GetTextureByName("gray");
     MenuServers.tWhite  = TEX.GetTextureByName("white");
     MenuServers.tBlue   = TEX.GetTextureByName("lightblue");
 }
コード例 #10
0
ファイル: BottomBar.cs プロジェクト: UnforeseenOcean/Warmode
 private void LoadEnd()
 {
     BottomBar.tBlack  = TEX.GetTextureByName("black");
     BottomBar.tWhite  = TEX.GetTextureByName("white");
     BottomBar.tVolume = TEX.GetTextureByName("volume");
     BottomBar.tScreen = TEX.GetTextureByName("widescreen");
     BottomBar.tWid    = TEX.GetTextureByName("wid");
     BottomBar.tLang   = TEX.GetTextureByName("lang");
 }
コード例 #11
0
ファイル: Vote.cs プロジェクト: UnforeseenOcean/Warmode
 public void PostAwake()
 {
     this.tBlack = TEX.GetTextureByName("black");
     this.tWhite = TEX.GetTextureByName("white");
     this.tGray0 = TEX.GetTextureByName("gray0");
     this.tGray2 = TEX.GetTextureByName("gray2");
     this.tBlue  = TEX.GetTextureByName("blue");
     this.tRed   = TEX.GetTextureByName("red");
 }
コード例 #12
0
 public void PostAwake()
 {
     this.tBlack          = TEX.GetTextureByName("black");
     this.tBlue           = TEX.GetTextureByName("blue");
     this.tRed            = TEX.GetTextureByName("red");
     this.tBombIconActive = TEX.GetTextureByName("GUI/c4_red");
     this.OnResize();
     ScoreTop.show = false;
 }
コード例 #13
0
 public void PostAwake()
 {
     MenuBanList.tBlack  = TEX.GetTextureByName("black");
     MenuBanList.tGray   = TEX.GetTextureByName("gray");
     MenuBanList.tRed    = TEX.GetTextureByName("red");
     MenuBanList.tOrange = TEX.GetTextureByName("orange");
     this.OnResize();
     MenuBanList.show = false;
 }
コード例 #14
0
ファイル: ChooseTeam.cs プロジェクト: UnforeseenOcean/Warmode
 public void PostAwake()
 {
     ChooseTeam.tAngle0 = TEX.GetTextureByName("GUI/menu_angle0");
     ChooseTeam.tAngle1 = TEX.GetTextureByName("GUI/menu_angle1");
     ChooseTeam.tWhite  = TEX.GetTextureByName("white");
     ChooseTeam.tBlack  = TEX.GetTextureByName("black");
     ChooseTeam.show    = false;
     this.OnResize();
 }
コード例 #15
0
 public void PostAwake()
 {
     Zombie.tInfectedScreen = Resources.Load <Texture2D>("Textures/blood_w");
     Zombie.infectionSound  = SND.GetSoundByName("zombie_infection");
     Zombie.attackSound     = SND.GetSoundByName("zombie_attack");
     this.tGradient         = TEX.GetTextureByName("GUI/left_gradient");
     Zombie.infectedScreen  = false;
     this.OnResize();
 }
コード例 #16
0
 public void LoadEnd()
 {
     MenuGold.tBlack  = TEX.GetTextureByName("black");
     MenuGold.tWhite  = TEX.GetTextureByName("white");
     MenuGold.tBuy    = TEX.GetTextureByName("lightblue");
     MenuGold.tOrange = TEX.GetTextureByName("orange");
     MenuGold.tGray   = TEX.GetTextureByName("gray");
     MenuGold.tGold   = TEX.GetTextureByName("gold_64");
     MenuGold.tVK     = TEX.GetTextureByName("vk");
 }
コード例 #17
0
ファイル: Profile.cs プロジェクト: UnforeseenOcean/Warmode
 public void PostAwake()
 {
     Profile.tBlack  = TEX.GetTextureByName("black");
     Profile.tWhite  = TEX.GetTextureByName("white");
     Profile.tGray   = TEX.GetTextureByName("gray");
     Profile.tBlue   = TEX.GetTextureByName("lightblue");
     Profile.tOrange = TEX.GetTextureByName("orange");
     Profile.tGreen  = TEX.GetTextureByName("green");
     this.OnResize();
 }
コード例 #18
0
 public void PostAwake()
 {
     this.LocalPlayer = GameObject.Find("LocalPlayer");
     this.tRed        = TEX.GetTextureByName("red");
     this.tWhite      = TEX.GetTextureByName("white");
     this.tYellow     = TEX.GetTextureByName("yellow");
     this.tRadar      = TEX.GetTextureByName("warradar");
     this.tTeam       = TEX.GetTextureByName("teammate");
     this.tBombIcon   = TEX.GetTextureByName("GUI/c4_orange");
     this.OnResize();
 }
コード例 #19
0
 public void LoadEnd()
 {
     TopBar.tHeader_logo = TEX.GetTextureByName("warlogo");
     TopBar.tPlay[0]     = TEX.GetTextureByName("waricon_play");
     TopBar.tPlay[1]     = TEX.GetTextureByName("waricon_play_hover");
     TopBar.tShop[0]     = TEX.GetTextureByName("waricon_shop");
     TopBar.tShop[1]     = TEX.GetTextureByName("waricon_shop_hover");
     TopBar.tOptions[0]  = TEX.GetTextureByName("waricon_options");
     TopBar.tOptions[1]  = TEX.GetTextureByName("waricon_options_hover");
     TopBar.tClose       = TEX.GetTextureByName("shutdown");
 }
コード例 #20
0
ファイル: Profile.cs プロジェクト: UnforeseenOcean/Warmode
 private void LoadEnd()
 {
     Profile.tGold         = TEX.GetTextureByName("gold_64");
     Profile.tBadgeBack    = TEX.GetTextureByName("warbadge_hor_empty");
     Profile.tBadgeIcon    = TEX.GetTextureByName("warbadge_icon_empty");
     Profile.tPlayer[0]    = TEX.GetTextureByName("player");
     Profile.tPlayer[1]    = TEX.GetTextureByName("player_hover");
     Profile.tInventory[0] = TEX.GetTextureByName("inventory");
     Profile.tInventory[1] = TEX.GetTextureByName("inventory_hover");
     Profile.tMercMask     = TEX.GetTextureByName("merc_default");
     Profile.tCorpMask     = TEX.GetTextureByName("warcorp_default");
 }
コード例 #21
0
 public void PostAwake()
 {
     MenuPlayer.tBlack      = TEX.GetTextureByName("black");
     MenuPlayer.tBlue       = TEX.GetTextureByName("lightblue");
     MenuPlayer.tOrange     = TEX.GetTextureByName("orange");
     MenuPlayer.show        = false;
     MenuPlayer.playermodel = -1;
     if (ContentLoader_.proceed)
     {
         MenuPlayer.show = true;
     }
 }
コード例 #22
0
 public void PostAwake()
 {
     this.tblack        = TEX.GetTextureByName("black");
     this.twhite        = TEX.GetTextureByName("white");
     this.tCrosshairHit = TEX.GetTextureByName("GUI/crosshair_hit");
     Crosshair.c[0]     = new Color(1f, 1f, 1f, 0.75f);
     Crosshair.c[1]     = new Color(1f, 1f, 1f, 0.5f);
     Crosshair.c[2]     = new Color(1f, 1f, 1f, 0.25f);
     this.OnResize();
     Crosshair.offsettime = 0f;
     Crosshair.SetActive(false);
 }
コード例 #23
0
ファイル: GUIM.cs プロジェクト: UnforeseenOcean/Warmode
 private void LoadEnd()
 {
     GUIM.fontlist[0] = ContentLoader_.LoadFont("Play-Regular");
     GUIM.fontlist[1] = ContentLoader_.LoadFont("Play-Bold");
     GUIM.tDebug      = TEX.GetTextureByName("red");
     GUIM.tBar[0]     = TEX.GetTextureByName("tr");
     GUIM.tBar[1]     = TEX.GetTextureByName("scroll_middle");
     GUIM.tBar[2]     = TEX.GetTextureByName("tr");
     GUIM.tBar[3]     = TEX.GetTextureByName("slider_normal");
     GUIM.tBar[4]     = TEX.GetTextureByName("slider_active");
     GUIM.tBar[5]     = TEX.GetTextureByName("slider_back");
     GUIM.tButton     = TEX.GetTextureByName("button");
 }
コード例 #24
0
ファイル: Main.cs プロジェクト: UnforeseenOcean/Warmode
    private void LoadEnd()
    {
        GameObject gameObject = GameObject.Find("Camera");

        if (gameObject && gameObject.GetComponent <AudioSource>())
        {
            gameObject.GetComponent <AudioSource>().clip = ContentLoader_.LoadAudio("maintheme");
            gameObject.GetComponent <AudioSource>().Play();
            gameObject.GetComponent <AudioSource>().volume = Options.menuvol;
        }
        Main.tVig = TEX.GetTextureByName("vig");
        MonoBehaviour.print("MAIN.LOADEND");
    }
コード例 #25
0
ファイル: MenuShop.cs プロジェクト: UnforeseenOcean/Warmode
 public void LoadEnd()
 {
     MenuShop.currData = null;
     MenuShop.tBlack   = TEX.GetTextureByName("black");
     MenuShop.tOrange  = TEX.GetTextureByName("orange");
     MenuShop.tGray    = TEX.GetTextureByName("gray");
     MenuShop.tWhite   = TEX.GetTextureByName("white");
     MenuShop.tGreen   = TEX.GetTextureByName("green");
     MenuShop.apply    = TEX.GetTextureByName("apply");
     MenuShop.view     = TEX.GetTextureByName("search");
     MenuShop.tGold    = TEX.GetTextureByName("gold_64");
     MenuShop.Init();
 }
コード例 #26
0
        /// <summary>
        /// Updates the displayed image
        /// </summary>
        /// <remarks>
        /// This is called when an image has either been imported or enabled/disabled
        /// </remarks>
        /// <param name="offset">The new offset for the image.</param>
        /// <param name="isColor">Is the image being udpated a color set.</param>
        public void UpdateImage(int offset, bool isColor)
        {
            if (isColor)
            {
                var colorBMP = MTRL.GetColorBitmap(offset);

                TextureType       = "A16B16G16R16F";
                TextureDimensions = "(4 x 16)";

                alphaBitmap = Imaging.CreateBitmapSourceFromHBitmap(colorBMP.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                var removeAlphaBitmap = SetAlpha(colorBMP, 255);

                noAlphaBitmap = Imaging.CreateBitmapSourceFromHBitmap(removeAlphaBitmap.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                colorBMP.Dispose();
                removeAlphaBitmap.Dispose();
            }
            else
            {
                if (SelectedMap.ID.Contains("vfx"))
                {
                    texData = TEX.GetVFX(offset);
                }
                else
                {
                    texData = TEX.GetTex(offset);
                }

                TextureType       = texData.TypeString;
                TextureDimensions = "(" + texData.Width + " x " + texData.Height + ")";

                alphaBitmap = Imaging.CreateBitmapSourceFromHBitmap(texData.BMP.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                var removeAlphaBitmap = SetAlpha(texData.BMP, 255);

                noAlphaBitmap = Imaging.CreateBitmapSourceFromHBitmap(removeAlphaBitmap.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                texData.Dispose();
                removeAlphaBitmap.Dispose();
            }

            if (AlphaChecked)
            {
                ImageSource = alphaBitmap;
            }
            else
            {
                ImageSource = noAlphaBitmap;
            }
        }
コード例 #27
0
 public void PostAwake()
 {
     HUD.cs                  = this;
     this.tBlack             = TEX.GetTextureByName("black");
     this.tGray0             = TEX.GetTextureByName("gray0");
     this.tWhite             = TEX.GetTextureByName("white");
     this.tYellow            = TEX.GetTextureByName("yellow");
     this.tHealthIcon        = TEX.GetTextureByName("GUI/health_icon");
     this.tArmorIcon         = TEX.GetTextureByName("GUI/armor_icon");
     this.tAmmoIcon          = TEX.GetTextureByName("GUI/ammo_icon");
     this.tFGIconOrange      = TEX.GetTextureByName("GUI/fg_orange");
     this.tFGIconGray        = TEX.GetTextureByName("GUI/fg_gray");
     this.tFGIconWhite       = TEX.GetTextureByName("GUI/fg_white");
     this.tFBIconOrange      = TEX.GetTextureByName("GUI/fb_orange");
     this.tFBIconGray        = TEX.GetTextureByName("GUI/fb_gray");
     this.tFBIconWhite       = TEX.GetTextureByName("GUI/fb_white");
     this.tSGIconOrange      = TEX.GetTextureByName("GUI/sg_orange");
     this.tSGIconGray        = TEX.GetTextureByName("GUI/sg_gray");
     this.tSGIconWhite       = TEX.GetTextureByName("GUI/sg_white");
     this.tBombIconNormal    = TEX.GetTextureByName("GUI/c4_orange");
     this.tBombIconActive    = TEX.GetTextureByName("GUI/c4_red");
     this.tDiffuseIconNormal = TEX.GetTextureByName("GUI/defuse_orange");
     this.tDiffuseIconActive = TEX.GetTextureByName("GUI/defuse_red");
     this.tGradientLeft      = TEX.GetTextureByName("GUI/left_gradient");
     this.tGradientRight     = TEX.GetTextureByName("GUI/right_gradient");
     this.tAmmoIcon          = TEX.GetTextureByName("GUI/bullets_icon");
     this.tMoneyIcon         = TEX.GetTextureByName("GUI/money_icon");
     this.tRed               = TEX.GetTextureByName("red");
     this.tBlue              = TEX.GetTextureByName("blue");
     this.OnResize();
     HUD.sHealth      = "-";
     HUD.sArmor       = "-";
     HUD.sMoney       = "0";
     HUD.Money        = 0;
     HUD.bombState    = 0;
     HUD.diffuseState = 0;
     HUD.show         = false;
     if (HUD.a == null)
     {
         HUD.a = base.gameObject.AddComponent <AudioSource>();
     }
     if (HUD.briefing == null)
     {
         HUD.briefing = ContentLoader_.LoadAudio("briefing");
     }
     if (HUD.champion == null)
     {
         HUD.champion = ContentLoader_.LoadAudio("champion");
     }
 }
コード例 #28
0
 public static void Init()
 {
     TEX.GenerateTexture(Color.black, "black");
     TEX.GenerateTexture(Color.white, "white");
     TEX.GenerateTexture(new Color(0.1f, 0.1f, 0.1f, 1f), "gray0");
     TEX.GenerateTexture(new Color(0.25f, 0.25f, 0.25f, 1f), "gray1");
     TEX.GenerateTexture(new Color(0.35f, 0.35f, 0.35f, 1f), "gray2");
     TEX.GenerateTexture(new Color(1f, 0.2f, 0f, 1f), "red");
     TEX.GenerateTexture(new Color(0f, 0.4f, 1f, 1f), "blue");
     TEX.GenerateTexture(new Color(1f, 1f, 0f, 1f), "yellow");
     TEX.GenerateTexture(new Color(0.3f, 0.3f, 0.3f, 1f), "gray");
     TEX.GenerateTexture(new Color(0.15f, 0.8f, 0.15f, 1f), "green");
     TEX.GenerateTexture(new Color(0f, 0.5f, 1f, 1f), "lightblue");
     TEX.GenerateTexture(new Color(1f, 0.2f, 0f, 1f), "orange");
 }
コード例 #29
0
ファイル: Main.cs プロジェクト: UnforeseenOcean/Warmode
 public void PostAwake()
 {
     Main.tBlack         = TEX.GetTextureByName("black");
     Main.tLoadingBackgr = (Resources.Load("GUI/loading_backgr") as Texture2D);
     Main.tLoadingCooler = (Resources.Load("GUI/loading_cooler") as Texture2D);
     Main.tLoadingProgr0 = (Resources.Load("GUI/loading_progr0") as Texture2D);
     Main.tLoadingProgr1 = (Resources.Load("GUI/loading_progr1") as Texture2D);
     Main.tLoadingProgr2 = (Resources.Load("GUI/loading_progr2") as Texture2D);
     Main.tLoadingProgr3 = (Resources.Load("GUI/loading_progr3") as Texture2D);
     Main.tLoadingProgr4 = (Resources.Load("GUI/loading_progr4") as Texture2D);
     Main.tLoadingProgr5 = (Resources.Load("GUI/loading_progr5") as Texture2D);
     Main.tLoadingProgr6 = (Resources.Load("GUI/loading_progr6") as Texture2D);
     Main.tLoadingProgr7 = (Resources.Load("GUI/loading_progr7") as Texture2D);
     this.OnResize();
     Options.Load();
     Options.Apply();
     Options.ApplyResolutionOnce();
     if (GameData.gSteam)
     {
         Steam.Init();
     }
     if (GameData.gSteam)
     {
         this.LoadAvatar();
     }
     Main.HideAll();
     if (GameData.gSteam)
     {
         Main.MainAuthSteam();
     }
     if (GameData.gSteam)
     {
         WebHandler.get_servers();
     }
     if (GameData.gSteam && Steam.active && Steam.logged)
     {
         Main.MainInventory();
     }
     if (GameData.gSteam)
     {
         MenuFriends.Load();
     }
     if (PlayerPrefs.HasKey("reconnect"))
     {
         PlayerPrefs.DeleteKey("reconnect");
         Application.LoadLevel("game");
     }
 }
コード例 #30
0
    public static void SetMaskTexture(int index, MenuShop.CShopData data)
    {
        GameObject gameObject;

        if (index == 0)
        {
            gameObject = GameObject.Find(MenuPlayer.goPlayer.name + "/player_merc");
        }
        else
        {
            gameObject = GameObject.Find(MenuPlayer.goPlayer.name + "/player_warcorp");
        }
        Texture2D textureByName = TEX.GetTextureByName("_" + data.iconname);

        gameObject.GetComponent <SkinnedMeshRenderer>().materials[0].SetTexture(0, textureByName);
    }