Пример #1
0
 public void HiddenGameObj()
 {
     IsTiShiOver = true;
     YouXiangObj.SetActive(false);
     gameObject.SetActive(false);
     YouLiangTiShiCtrl.GetInstance().HiddenGameObj();
 }
    public void InitRenWuSprite()
    {
        if (RenWuXinXiObj.activeSelf)
        {
            return;
        }
        RenWuXinXiObj.SetActive(true);
        LoadedLevelVal = Application.loadedLevel - 1;
        if (XkGameCtrl.GetInstance().IsCartoonShootTest)
        {
            LoadedLevelVal = 0;             //test
        }
        int    max           = RwSpriteInfo.Length;
        int    levelNum      = LoadedLevelVal + 1;
        string spriteNameTmp = "";

        int          indexTmp    = 0;
        int          indexVal    = 0;
        string       EnInfoStr   = "";
        GameTextType gameTextVal = XKGlobalData.GetGameTextMode();

        if (gameTextVal == GameTextType.English)
        {
            EnInfoStr = "_En";
        }

        for (int i = 0; i < max; i++)
        {
            if (LoadedLevelVal == 0)
            {
                RwSpriteInfo[i].enabled = false;
            }
            RwSpriteInfo[i].fillAmount = 0f;
            indexTmp = i % 3;
            if (indexTmp < CountRenWuInfo[LoadedLevelVal])
            {
                if (i > 2)
                {
                    indexVal = 2;
                }
                spriteNameTmp = levelNum + "_" + indexVal + "_" + indexTmp + EnInfoStr;
                //Debug.Log("name "+spriteNameTmp);
                RwSpriteInfo[i].spriteName = spriteNameTmp;
            }
        }

        max = RedSprite.Length;
        for (int i = 0; i < max; i++)
        {
            if (LoadedLevelVal == 0)
            {
                RedSprite[i].enabled = false;
            }
            RedSprite[i].gameObject.SetActive(false);

            indexTmp = i % 3;
            if (indexTmp < CountRenWuRedInfo[LoadedLevelVal])
            {
                spriteNameTmp = levelNum + "_1_" + indexTmp + EnInfoStr;
                //Debug.Log("name ** "+spriteNameTmp);
                RedSprite[i].spriteName = spriteNameTmp;
            }
        }

        if (LoadedLevelVal == 0)
        {
            YouLiangTiShiCtrl.GetInstance().ShowYouLiangTiShi();
        }
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     _Instance = this;
     YouLiangBiaoObj.SetActive(false);
     gameObject.SetActive(false);
 }