Beispiel #1
0
 public void Init(int wingId)
 {
     WingGlobal.ResetRawImage();
     if (this.m_WingPreviewCellCurrent != null && this.m_WingPreviewCellCurrent.get_gameObject() != null)
     {
         Object.Destroy(this.m_WingPreviewCellCurrent.get_gameObject());
     }
     if (this.m_WingPreviewCellNext != null && this.m_WingPreviewCellNext.get_gameObject() != null)
     {
         Object.Destroy(this.m_WingPreviewCellNext.get_gameObject());
     }
     this.m_current_wingId    = wingId;
     this.m_current_winglevel = WingManager.GetWingLv(wingId);
     this.m_wingLvInfoL       = WingManager.GetWingLvInfo(this.m_current_wingId, this.m_current_winglevel);
     this.m_wingLvInfoR       = WingManager.GetWingLvInfoNextDifferent(this.m_current_wingId, this.m_current_winglevel);
     if (this.m_wingLvInfoL.model == this.m_wingLvInfoR.model)
     {
         this.m_wingLvInfoL = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_current_winglevel);
     }
     this.m_WingPreviewCellCurrent = WingGlobal.GetOneWingPreview(base.get_transform());
     this.m_WingPreviewCellCurrent.get_transform().set_localPosition(new Vector3(-245f, 0f));
     this.m_WingPreviewCellNext = WingGlobal.GetOneWingPreview(base.get_transform());
     this.m_WingPreviewCellNext.get_transform().set_localPosition(new Vector3(245f, 0f));
     base.get_transform().Find("imgArrow").SetAsLastSibling();
     this.SetWingPreviewCellAll();
 }
Beispiel #2
0
 protected override void ReleaseSelf(bool calledDestroy)
 {
     if (SystemConfig.IsReleaseResourceOn && calledDestroy)
     {
         WingGlobal.ResetRawImage();
         base.ReleaseSelf(true);
     }
 }
Beispiel #3
0
 private void SetButtonWearAndButtonUndress()
 {
     if (WingGlobal.IsWingWearAndNoHidden(1))
     {
         this.m_btnUndress.get_gameObject().SetActive(true);
     }
     else
     {
         this.m_btnWear.get_gameObject().SetActive(true);
     }
 }
Beispiel #4
0
 private void OnApplicationPause(bool bPause)
 {
     WingGlobal.ResetRawImage();
     this.mWingPreviewCell.DoOnApplicationPause();
     TimerHeap.AddTimer(2000u, 0, delegate
     {
         if (this != null && base.get_gameObject() != null && base.get_gameObject().get_activeInHierarchy())
         {
             WingGlobal.ResetRawImage();
             this.mWingPreviewCell.DoOnApplicationPause();
         }
     });
 }
Beispiel #5
0
    private void OnClickBtnArrowL()
    {
        wingLv wingLvInfoPreDifferent = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_wingLvInfoL.lv);

        if (wingLvInfoPreDifferent.model == this.m_wingLvInfoL.model)
        {
            return;
        }
        this.m_wingLvInfoR = this.m_wingLvInfoL;
        this.m_wingLvInfoL = wingLvInfoPreDifferent;
        WingGlobal.ResetRawImage();
        this.SetWingPreviewCellAll();
    }
Beispiel #6
0
    private void Init(int wingId)
    {
        WingGlobal.ResetRawImage();
        if (this.mWingPreviewCell != null && this.mWingPreviewCell.get_gameObject() != null)
        {
            Object.Destroy(this.mWingPreviewCell.get_gameObject());
        }
        wings wingInfo  = WingManager.GetWingInfo(wingId);
        int   wingLv    = WingManager.GetWingLv(wingId);
        int   wingModel = WingManager.GetWingModel(wingId, wingLv);

        this.mWingPreviewCell = WingGlobal.GetOneWingPreview(base.get_transform());
        this.mWingPreviewCell.SetRawImage(wingModel);
        this.mWingPreviewCell.SetName(TextColorMgr.GetColorByQuality(wingInfo.name, wingInfo.color));
    }
Beispiel #7
0
    public long GetFightingByStrongerType(StrongerType type)
    {
        long result = 0L;

        switch (type)
        {
        case StrongerType.Equip:
            result = EquipGlobal.GetAllEquipAttrValue();
            break;

        case StrongerType.EquipStrength:
            result = EquipGlobal.GetAllEquipDevelopAttrValue();
            break;

        case StrongerType.EquipStarUp:
            result = EquipGlobal.GetAllEquipStarUpAttrValue();
            break;

        case StrongerType.EquipEnchantment:
            result = EquipGlobal.GetAllEquipEnchantmentAttrValue();
            break;

        case StrongerType.Gem:
            result = GemGlobal.getAllGemAttrValue();
            break;

        case StrongerType.Wing:
            result = WingGlobal.GetCurrentWingFightingValue();
            break;

        case StrongerType.PetLevel:
            result = (long)PetManager.Instance.GetFormationPetLevel();
            break;

        case StrongerType.PetUpgrade:
            result = PetManager.Instance.GetFormationAddFighting();
            break;

        case StrongerType.GodSoldier:
            result = GodSoldierManager.Instance.GetAllGodSoliderAttrValue();
            break;
        }
        return(result);
    }
Beispiel #8
0
    public static GameObject SetRawImage(RawImage rawImage, int wingModelId)
    {
        RenderTexture renderTexture = null;

        RTManager.CreateRenderTexture(ref renderTexture, "temp_render_texture");
        rawImage.GetComponent <RectTransform>().set_sizeDelta(new Vector2((float)renderTexture.get_width(), (float)renderTexture.get_height()));
        RTManager.SetRT(rawImage, renderTexture);
        Camera     camera = WingGlobal.CreateCameraToModel(renderTexture);
        ActorModel model  = WingGlobal.GetModel(wingModelId);

        WingGlobal.cameras.Add(camera.get_gameObject());
        WingGlobal.models.Add(model.get_gameObject());
        camera.get_transform().set_rotation(model.get_transform().get_rotation() * Quaternion.AngleAxis(180f, Vector3.get_up()));
        Vector3 vector  = model.get_transform().get_up() * 0.9f;
        Vector3 vector2 = model.get_transform().get_forward() * 2.95f;

        camera.get_transform().set_position(model.get_transform().get_position() + vector + vector2);
        return(model.get_gameObject());
    }
Beispiel #9
0
 public static void FindNodeRecursive(Transform parent, ref Transform node, string name)
 {
     if (node != null)
     {
         return;
     }
     if (parent == null)
     {
         return;
     }
     if (parent.get_name().TrimEnd(new char[]
     {
         ' '
     }) == name)
     {
         node = parent;
         return;
     }
     for (int i = 0; i < parent.get_childCount(); i++)
     {
         Transform child = parent.GetChild(i);
         WingGlobal.FindNodeRecursive(child, ref node, name);
     }
 }
 public void SetRawImage(int wingModelId)
 {
     this.m_wingModelId = wingModelId;
     this.m_model       = WingGlobal.SetRawImage(this.m_rawImage, wingModelId);
 }
Beispiel #11
0
 private void OnApplicationFocus(bool focusStatus)
 {
     WingGlobal.ResetRawImage();
     this.m_WingPreviewCellCurrent.DoOnApplicationPause();
     this.m_WingPreviewCellNext.DoOnApplicationPause();
 }