예제 #1
0
 public void ResetUI()
 {
     this.ListViewLeft.Refresh();
     this.ListViewRight.Refresh();
     this.TextTime.set_text(TimeConverter.ChangeSecsToString(InstanceManager.CurUsedTime));
     if (this.currentDamageCalMode == DamageHealCalModeEnum.Active)
     {
         this.TextDamageNumLeft.set_text(BattleDmgCollectManager.Instance.campSelfTotalActive.ToString());
         this.TextDamageNumRight.set_text(BattleDmgCollectManager.Instance.campEnemyTotalActive.ToString());
         this.BtnTypeDamage.get_transform().FindChild("Image1").get_gameObject().SetActive(true);
         this.BtnTypeDamage.get_transform().FindChild("Image2").get_gameObject().SetActive(false);
         this.BtnTypeHit.get_transform().FindChild("Image1").get_gameObject().SetActive(false);
         this.BtnTypeHit.get_transform().FindChild("Image2").get_gameObject().SetActive(true);
         this.TextDamageLeft.get_gameObject().SetActive(true);
         this.TextDamageRight.get_gameObject().SetActive(true);
         this.TextHealLeft.get_gameObject().SetActive(false);
         this.TextHealRight.get_gameObject().SetActive(false);
     }
     else
     {
         this.TextDamageNumLeft.set_text(BattleDmgCollectManager.Instance.campSelfTotalInActive.ToString());
         this.TextDamageNumRight.set_text(BattleDmgCollectManager.Instance.campEnemyTotalInActive.ToString());
         this.BtnTypeDamage.get_transform().FindChild("Image1").get_gameObject().SetActive(false);
         this.BtnTypeDamage.get_transform().FindChild("Image2").get_gameObject().SetActive(true);
         this.BtnTypeHit.get_transform().FindChild("Image1").get_gameObject().SetActive(true);
         this.BtnTypeHit.get_transform().FindChild("Image2").get_gameObject().SetActive(false);
         this.TextDamageLeft.get_gameObject().SetActive(false);
         this.TextDamageRight.get_gameObject().SetActive(false);
         this.TextHealLeft.get_gameObject().SetActive(true);
         this.TextHealRight.get_gameObject().SetActive(true);
     }
 }
    public void SetUI(MineInfo mineInfo, int index)
    {
        MinePetInfo mpi = ElementInstanceManager.Instance.m_elementCopyLoginPush.minePetInfos.get_Item(index);

        this.m_blockID = mpi.blockId;
        BlockInfo    blockInfo    = ElementInstanceManager.Instance.m_elementCopyLoginPush.activateBlocks.Find((BlockInfo a) => a.blockId == mpi.blockId);
        YKuangJingKu yKuangJingKu = DataReader <YKuangJingKu> .Get(blockInfo.incidentTypeId);

        this.TextMineName.set_text(yKuangJingKu.holdName);
        ResourceManager.SetSprite(this.ImageProduceIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(yKuangJingKu.item.get_Item(0)).icon));
        PetInfo petInfo = PetManager.Instance.GetPetInfo(mpi.petId);
        int     num     = 0;

        this.TextMineTime.set_text(TimeConverter.ChangeSecsToString(ElementInstanceManager.Instance.GetTimeCal(mineInfo.blockId)));
        if (DataReader <Pet> .Get(petInfo.petId).element == yKuangJingKu.petType)
        {
            num = yKuangJingKu.petStar.get_Item(petInfo.star - 1);
        }
        this.TextProduceValue.set_text((mineInfo.debrisInfos == null || mineInfo.debrisInfos.get_Count() <= 0) ? "0" : mineInfo.debrisInfos.get_Item(0).debrisNum.ToString());
        this.TextProduceNum.set_text((yKuangJingKu.itemAddTime.get_Item(0) + num).ToString() + "/小时");
        ResourceManager.SetSprite(this.ImagePetIcon, PetManager.Instance.GetSelfPetIcon(petInfo.petId));
        ResourceManager.SetSprite(this.ImageMine, GameDataUtils.GetIcon(yKuangJingKu.icon));
        if (mineInfo.debrisInfos.get_Count() == 0)
        {
            ImageColorMgr.SetImageColor(this.BtnGet.get_transform().FindChild("Image").GetComponent <Image>(), true);
            this.BtnGet.set_enabled(false);
        }
        else
        {
            ImageColorMgr.SetImageColor(this.BtnGet.get_transform().FindChild("Image").GetComponent <Image>(), false);
            this.BtnGet.set_enabled(true);
        }
    }
예제 #3
0
 private void Update()
 {
     if (this.isScrollTo)
     {
         this.scrollPercent += this.scrollSpeed;
         BallElement.Instance.get_transform().set_rotation(Quaternion.Lerp(this.scrollOriginDir, this.scrollTargetDir, this.scrollPercent));
         BallElement.Instance.ballLight.set_rotation(BallElement.Instance.get_transform().get_rotation());
         if (this.scrollPercent > 1f)
         {
             this.isScrollTo = false;
         }
     }
     else if (this.continueRotate && this.percent > 0f)
     {
         this.percent -= this.slowSpeed;
         BallElement.Instance.get_transform().set_rotation(Quaternion.Lerp(BallElement.Instance.get_transform().get_rotation(), BallElement.Instance.get_transform().get_rotation() * this.quaternionDir, this.percent));
         BallElement.Instance.ballLight.set_rotation(BallElement.Instance.get_transform().get_rotation());
     }
     this.timeCalDelta    += Time.get_deltaTime();
     this.revetEnergyTime -= Time.get_deltaTime();
     if (this.timeCalDelta > 1f)
     {
         this.timeCalDelta = 0f;
         if (this.revetEnergyTime >= 0f)
         {
             this.TextTime.set_text(TimeConverter.ChangeSecsToString((int)this.revetEnergyTime));
         }
     }
 }
 private void Update()
 {
     this.timeCalDelta += Time.get_deltaTime();
     if (this.timeCalDelta > 1f)
     {
         this.TextTimeLast.set_text(TimeConverter.ChangeSecsToString(ElementInstanceManager.Instance.GetTimeCal(this.minePetInfo.blockId)));
     }
 }
 public void ResetTimeCal()
 {
     this.timeCalDelta = 0f;
     this.TextTimeLast.set_text(TimeConverter.ChangeSecsToString(ElementInstanceManager.Instance.GetTimeCal(this.minePetInfo.blockId)));
 }
 public void ResetTimeCal()
 {
     this.timeCalDelta = 0f;
     this.TextMineTime.set_text(TimeConverter.ChangeSecsToString(ElementInstanceManager.Instance.GetTimeCal(this.m_blockID)));
 }