Exemple #1
0
    void OnClickZGBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (!IsBagSystemContainsLottery())
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("meiyouguaguaka"));
            return;
        }
        EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_Guaguaka, gameObject.transform);
        for (int k = 0; k < BagSystem.instance.BagItems.Length; k++)
        {
            if (BagSystem.instance.BagItems[k] == null)
            {
                continue;
            }
            ItemData idata = ItemData.GetData((int)BagSystem.instance.BagItems[k].itemId_);

            if (idata.subType_ == ItemSubType.IST_Lottery)
            {
                COM_Item citem = BagSystem.instance.GetItemByItemId((uint)idata.id_);
                NetConnection.Instance.useItem((uint)citem.slot_, 0, 1);
                isZGBtn = true;
            }
        }
        LotteryData ldata = LotteryData.GetData(ranking);

        BonusContent.text = ldata.Win_symbol;
        //tishiLabel.text = LanguageManager.instance.GetValue ("guagua").Replace("{n}",ldata.RewardName_);
    }
Exemple #2
0
        private void CreateKnifeBlinkEffect()
        {
            this.knifeBlink = EntityStates.Huntress.BlinkState.blinkPrefab.InstantiateClone("KinfeBink", false);


            EffectAPI.AddEffect(this.knifeBlink);
        }
Exemple #3
0
 // Update is called once per frame
 void Update()
 {
     if (MoreActivityData.drawCardOk)
     {
         UpdateCoin();
         if (MoreActivityData.GetCardsData().contents_.Length == 0)
         {
             UIEventListener listener = null;
             for (int i = 0; i < cards.Length; ++i)
             {
                 cards[i].SetStatus(true);
                 listener           = UIEventListener.Get(cards[i].gameObject);
                 listener.parameter = i;
                 listener.onClick  += OnClickMask;
             }
         }
         if (drawCardObj != null)
         {
             MA_CardsItem card = drawCardObj.GetComponent <MA_CardsItem>();
             card.SetStatus(false);
             card.SetData(MoreActivityData.GetCardReward(crtIdx));
             EffectAPI.PlayUIEffect((EFFECT_ID)1066, card.got.transform, null, (GameObject eff) =>
             {
                 eff.transform.localPosition = Vector3.zero;
             });
             drawCardObj = null;
         }
         crtIdx = -1;
         MoreActivityData.drawCardOk = false;
     }
 }
Exemple #4
0
 void RefreshGstrengthenlevel(int babyid, int level)
 {
     if (Inst == null)
     {
         return;
     }
     Refresh(babyid);
     if (Inst.intensifyLevel_ == level)
     {
         EffectAPI.PlayUIEffect(EFFECT_ID.EFFECT_qianghuashibai, gameObject.transform, null, null);
     }
     else
     {
         EffectAPI.PlayUIEffect(EFFECT_ID.EFFECT_qianghuachenggong, gameObject.transform, null, null);
     }
     Inst.intensifyLevel_ = (uint)level;
     if (BagSystem.instance.GetItemMaxNum((uint)itemID()) >= itemCount())
     {
         enterBtn.isEnabled = true;
     }
     else
     {
         enterBtn.isEnabled = false;
     }
 }
Exemple #5
0
    void ShowHitEffect(int idx)
    {
        if (idx == -1)
        {
            return;
        }

        BattleActor aim = isMelee_? aim_: aims_[idx];

        if (aim == null)
        {
            return;
        }

        bool playSkillEffect = aim.ControlEntity.PlaySkillBeattackEffect(crt_data_._Id);

        if (playSkillEffect)
        {
            EffectAPI.Play((EFFECT_ID)crt_data_._Beattack_effectID, aim.ControlEntity.ActorObj, null, null, null, (EffectInst ei, ParamData data) =>
            {
                if (aim == null || aim.ControlEntity == null || aim.ControlEntity.ActorObj == null)
                {
                    return;
                }
                ei.transform.parent     = aim.ControlEntity.ActorObj.transform;
                ei.transform.localScale = Vector3.one;
            });
        }
        else
        {
            aim.ControlEntity.UpdateStateTick(crt_data_._IsPhysic);
        }
    }
Exemple #6
0
 public void AddSkillItems(Dictionary <int, List <COM_Skill> > sks)
 {
     foreach (KeyValuePair <int, List <COM_Skill> > pair in sks)
     {
         GameObject o = GameObject.Instantiate(sItem) as GameObject;
         o.SetActive(true);
         o.transform.parent = sGrrid.transform;
         SkillData    sdata = SkillData.GetMinxiLevelData(pair.Key);
         UITexture [] texs  = o.GetComponentsInChildren <UITexture>();
         foreach (UITexture te in texs)
         {
             if (te.name.Equals("skillIcon"))
             {
                 HeadIconLoader.Instance.LoadIcon(sdata._ResIconName, te);
             }
         }
         UILabel [] las = o.GetComponentsInChildren <UILabel>();
         foreach (UILabel la in las)
         {
             if (la.name.Equals("numLabel"))
             {
                 la.text = skillexp(pair.Value).ToString();
                 //StartCoroutine(NumScrollEffect(int.Parse(la.text),la));
             }
         }
         if (IsSkillLevelUp(pair.Value[0]))
         {
             EffectAPI.PlayUIEffect(EFFECT_ID.EFFECT_jinengshengji, o.transform);
         }
         o.transform.localPosition = new Vector3(0, 0, 0);
         o.transform.localScale    = new Vector3(1, 1, 1);
         sGrrid.repositionNow      = true;
     }
 }
Exemple #7
0
    void HitHim(int idx)
    {
        if (members_[idx].ControlEntity == null)
        {
            ApplicationEntry.Instance.PostSocketErr(57557);
            return;
        }
        simpleHitCount++;
        AttaclPanel.Instance.togetherHitCrl_.SetNum(simpleHitCount);
        SkillData skill           = SkillData.GetMinxiLevelData(GlobalValue.GetAttackID(members_[idx].GetWeaponType()));
        bool      playSkillEffect = aim_.ControlEntity.PlaySkillBeattackEffect(skill._Id);

        if (playSkillEffect)
        {
            EffectAPI.Play((EFFECT_ID)skill._Beattack_effectID, aim_.ControlEntity.ActorObj);
        }
        else
        {
            int effId = aim_.ControlEntity.GetStateBeattackEffectID(skill._Id);
            EffectAPI.Play((EFFECT_ID)effId, aim_.ControlEntity.ActorObj);
        }

        int change = (int)props_[memberCount_].prop_.value_ - CurrentHp_;

        CurrentHp_ += change;
        aim_.ControlEntity.hitOver_ = props_[memberCount_].fly_;

        int[]  typs = aim_.ControlEntity.StateTypes;
        int    rtst = 0;
        string err  = "";

        GameScript.Call(ScriptGameEvent.SGE_TogetherState, new object[] { typs }, new object[] { rtst }, ref err);

        TogetherStateType tst = (TogetherStateType)rtst;//GameScript.TogetherStateEvent (ScriptGameEvent.SGE_TogetherState, aim_.ControlEntity.StateTypes);

        if (tst == TogetherStateType.TST_Self)
        {
            skipIdx = memberCount_;
            aim_.ControlEntity.PopValueChange(change, PropertyType.PT_HpCurr, aim_.battlePlayer.hpMax_, aim_.battlePlayer.mpMax_);
            includeChange += change;
        }
        else if (tst == TogetherStateType.TST_Enemy)
        {
            members_[memberCount_].ControlEntity.PopValueChange(change, PropertyType.PT_HpCurr, aim_.battlePlayer.hpMax_, aim_.battlePlayer.mpMax_);
        }

        bool hasAInvalid = hasActionInvalid();

        if (idx != members_.Length - 1)
        {
            aim_.ControlEntity.Beattack_1(skill._Id, skill._Level, !hasAInvalid, false, false, members_[memberCount_]);
        }
        else
        {
            aim_.ControlEntity.Beattack_1(skill._Id, skill._Level, !hasAInvalid, CurrentHp_ <= 0, false, members_[memberCount_]);
        }
        aim_.ControlEntity.LookAt(members_[memberCount_].ControlEntity.ActorObj);
        aim_.ControlEntity.UpdateStateTick(true);
    }
Exemple #8
0
 void OnMagicTupoEnvet(int level)
 {
     PopText.Instance.Show(LanguageManager.instance.GetValue("tupochenggong"));
     tupoObj.GetComponent <magicItemTupoUI>().UpdateMagicItem();
     tupoObj.GetComponent <magicItemTupoUI> ().suolianImg.gameObject.SetActive(false);
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_magicTupo, transform);
     //EffectAPI.PlayUIEffect ((EFFECT_ID)GlobalValue.EFFECT_magicTuposuolian,transform);
 }
Exemple #9
0
        private void CreateKnifeSlashEffect()
        {
            this.knifeSlash = EntityStates.Merc.WhirlwindBase.swingEffectPrefab.InstantiateClone("KnifeSlash", false);
            this.knifeSlash.transform.Find("SwingTrail").localScale *= 5f;
            this.knifeSlash.transform.Find("Distortion").localScale *= 5f;

            EffectAPI.AddEffect(this.knifeSlash);
        }
Exemple #10
0
    public void Do(DieActionType dieType, BattleActor actor)
    {
        if (dieType == DieActionType.DAT_Fly ||
            dieType == DieActionType.DAT_Knock)
        {
            if (GamePlayer.Instance.BattleBaby != null &&
                GamePlayer.Instance.BattleBaby.InstId == actor.InstId)
            {
                GamePlayer.Instance.BabyState(GamePlayer.Instance.BattleBaby.InstId, false);
            }
        }
        dieType_ = dieType;
        actor_   = actor;
        switch (dieType_)
        {
        case DieActionType.DAT_Normal:
            actor_.ControlEntity.SetAnimationParam(GlobalValue.BDead, AnimatorParamType.APT_Boolean, true);
            if (actor_.battlePlayer.type_ == EntityType.ET_Monster && Battle.Instance.isEnemy(actor_.BattlePos))
            {
                Invoke("DealAIDie", 1.5f);
            }
            else
            {
                EffectAPI.Play(EFFECT_ID.Effect_Die, actor_.ControlEntity.ActorObj, null, null, null, actor_.ControlEntity.StarEffectInstCallBack);
            }
            break;

        case DieActionType.DAT_Fly:
            //ClientLog.Instance.Log("Actor die for Fly.");
            flyTime_ = 0f;
            flyFrom_ = actor_.ControlEntity.ActorObj.transform.position;
            flyTo_   = actor_.ControlEntity.ActorObj.transform.position + actor_.ControlEntity.ActorObj.transform.forward * -10f;

            //用这个moveTo会有问题 不到达目的地 没有回调

            //actor_.ControlEntity.MoveTo(actor_.ControlEntity.ActorObj.transform.localPosition + actor_.ControlEntity.ActorObj.transform.forward * -3f, (int data) =>
            //{
            //    Battle.Instance.DeleteBattleEntityItem(actor_.InstId);
            //    actor_.ControlEntity.DieActionFinishCallBack();
            //}, false, false, 0.5f);
            break;

        case DieActionType.DAT_Knock:
            //ClientLog.Instance.Log("Actor die for Knock.");
            MakeTrack();
            knockQue_ = new Queue <GameObject>();
            for (int i = 0; i < trackObjs_.Length; ++i)
            {
                knockQue_.Enqueue(trackObjs_[i]);
            }
            MoveToOneKP();
            break;

        default:
            break;
        }
    }
Exemple #11
0
    private void MakeOk(COM_Item item)
    {
        GuideManager.Instance.ClearMask();
        topImg.gameObject.SetActive(true);
        PBPropImg.gameObject.SetActive(false);
        PropImg.gameObject.SetActive(false);
        EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_chilun, transform, () => {
            topImg.gameObject.SetActive(false);
            compoundOkPanel.gameObject.SetActive(true);
            PBPropImg.gameObject.SetActive(true);
            PropImg.gameObject.SetActive(true);
            compoundOkPanel.GetComponent <BagTipsUI>().Item = item;
            if (item.itemId_ == MakeData.GetData(_selectSkillCell.MakeId).specialID_)
            {
                EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_juepinItem, transform, null);               //()=>{});
            }
        });

        MakeData make = MakeData.GetData(_selectSkillCell.MakeId);

        for (int i = 0; i < make.needItems.Length; i++)
        {
            int itemCount = BagSystem.instance.GetItemMaxNum(uint.Parse(make.needItems[i]));
            needItemsIcon[i].gameObject.transform.Find("num").GetComponent <UILabel>().text  = itemCount.ToString() + "/" + make.needItemNum[i];
            needItemsIcon[i].gameObject.transform.Find("num").GetComponent <UILabel>().color = Color.white;

            if (itemCount < int.Parse(make.needItemNum[i]))
            {
                needItemsIcon[i].gameObject.transform.Find("num").GetComponent <UILabel>().color = Color.red;
                isItemEnough = false;
            }
        }
        if (make.needMoney > GamePlayer.Instance.GetIprop(PropertyType.PT_Money))
        {
            compoundBtn.isEnabled = false;
        }

        //gemIcon.spriteName = "";
        //ItemIcon = 0;
        if (_gemItem != null && _gemItem.cellPane != null)
        {
            _gemItem.cellPane.gameObject.SetActive(false);
        }
        gemInfoObj.gameObject.SetActive(false);
        _gemId          = 0;
        gemName.text    = "";
        gemNameLab.text = LanguageManager.instance.GetValue("inlaygem");
        UpdataGemList();

        foreach (var x in chindCellList)
        {
            x.GetComponent <CompoundSkillCellUI>().updateRed();
        }

        GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_MainMakeItemOk);
    }
Exemple #12
0
 void OnEmployeeStarOk(Employee inst)
 {
     curEmployee = inst;
     EmployessSystem.instance.CurEmployee = curEmployee;
     PopText.Instance.Show(LanguageManager.instance.GetValue("shengxingok"));
     //	EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_JinjieSuccess, gameObject.transform);
     blackImg.gameObject.SetActive(true);
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_employeeStarOk, gameObject.transform, () => { blackImg.gameObject.SetActive(false); });
     UpdataPanel();
 }
Exemple #13
0
 void CompoundOkEnvet(int id)
 {
     Item = BagSystem.instance.GetItemByInstId((int)item_.instId_);
     black.gameObject.SetActive(true);
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_fuwenhecheng, gameObject.transform, () =>
     {
         black.gameObject.SetActive(false);
         GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_BagFuwenCombieSuccess);
     });
 }
Exemple #14
0
 void CrystalPropOKEnvent(bool b)
 {
     for (int i = 0; i < changeProp.Count; i++)
     {
         if (!lockNumList.Contains(i))
         {
             EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_zhihuanKS, changeProp[i].transform, null, (GameObject eff) => { eff.transform.localPosition = Vector3.zero; });
         }
     }
     //lockNumList.Clear ();
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_zhihuancg, gameObject.transform, () => {});
 }
Exemple #15
0
 void LevelUpEnvent(bool b)
 {
     if (b)
     {
         EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_familyLevelUp, gameObject.transform, () => {});
     }
     else
     {
         EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_zhihuanSb, gameObject.transform, () => {});
         UpdateInfo();
     }
 }
Exemple #16
0
    public static void SubmitQuestOk(int id)
    {
        QuestData q = QuestData.GetData(id);

        if (OnQuestEffectFinish != null)
        {
            OnQuestEffectFinish(id);
        }
        //DelTrackQues (id);
        EraseQuestInst(id);

        if (q.questKind_ == QuestKind.QK_Profession)
        {
            for (int i = 0; i < CompletedList.Count; ++i)
            {
                QuestData tmpQ = QuestData.GetData(CompletedList[i]);
                if (tmpQ.questKind_ == QuestKind.QK_Profession)
                {
                    CompletedList.RemoveAt(i);
                    break;
                }
            }
        }

        if (q.questKind_ != QuestKind.QK_Tongji)
        {
            if (!CompletedQuestList.Contains(id))
            {
                CompletedQuestList.Add(id);
                UpdateAcceptableQuests();
                if (OnQuestUpdate != null)
                {
                    OnQuestUpdate();
                }
                isDirty = true;
                GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_NpcRenwuSubmit, id);
                EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_ComplishQuest, ApplicationEntry.Instance.uiRoot.transform);
            }
        }
        if (q.questType_ == QuestType.QT_GiveBaby || q.questType_ == QuestType.QT_GiveItem)
        {
            TurnOnUIPlanel.HideMe();
            NpcRenwuUI.SwithShowMe();
        }
        if (IsCopyEndId(id))
        {
            CopyTipsUI.SwithShowMe();
//			MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("gongxitongguan"),()=>{
//				NetConnection.Instance.exitCopy();
//			},true,null,null,LanguageManager.instance.GetValue("likai"));
        }
    }
Exemple #17
0
 public static void openBattle(string otehername, int num, int level)
 {
     //GlobalValue.Get (Constant.C_GuildBattleStartIntervalTime, out guildBatatleStateTime);
     battleState = 1;
     otherName   = otehername;
     otherNum    = num;
     otherlevel  = level;
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_jiazhuzhankaiqi, ApplicationEntry.Instance.uiRoot.transform);
     if (updateGuildBattleEventOk != null)
     {
         updateGuildBattleEventOk(otehername);
     }
 }
Exemple #18
0
 public static void closeGuildBattle(bool isWinner)
 {
     battleState = 3;
     if (isWinner)
     {
         EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_jiazuzhandoushengli, ApplicationEntry.Instance.uiRoot.transform);
     }
     else
     {
         EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_jiazuzhanshibai, ApplicationEntry.Instance.uiRoot.transform);
     }
     //EffectAPI.PlayUIEffect ((EFFECT_ID)GlobalValue.EFFECT_jiazhuzhanjieshu, ApplicationEntry.Instance.uiRoot.transform);
 }
Exemple #19
0
 public static void StartGuildBattle(string otName, int otherCon, int selfCon)
 {
     battleState   = 2;
     selfwinCount  = selfCon;
     otherwinCount = otherCon;
     otherName     = otName;
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_jiazuzhandoukaishi, ApplicationEntry.Instance.uiRoot.transform);
     GlobalInstanceFunction.isGuildBattleStart = false;
     if (startGuildBattleOk != null)
     {
         startGuildBattleOk(otherName, otherCon, selfCon);
     }
 }
Exemple #20
0
    public void ShowSkill(int effId, Vector3 uiPos, float time = 2f)
    {
        EffectAPI.PlaySceneEffect((EFFECT_ID)effId, uiPos, null, null, true);
        //skillName_.text = name;
        //skillName_.transform.localPosition = uiPos;
        //skillName_.gameObject.SetActive(true);
        //GlobalInstanceFunction.Instance.Invoke(() =>
        //{

        //    if (skillName_ == null || skillName_.gameObject == null)
        //        return;
        //    skillName_.gameObject.SetActive(false);
        //}, time);
    }
Exemple #21
0
        private GameObject CreateIceExplosionEffect()
        {
            this.CreateIceBombTex();

            GameObject             obj    = Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/AffixWhiteExplosion").InstantiateClone("IceExplosion", false);
            ParticleSystemRenderer sphere = obj.transform.Find("Nova Sphere").GetComponent <ParticleSystemRenderer>();
            Material mat = UnityEngine.Object.Instantiate <Material>(sphere.material);

            mat.SetTexture("_RemapTex", this.iceBombTex);
            sphere.material = mat;

            _ = EffectAPI.AddEffect(obj);
            return(obj);
        }
Exemple #22
0
    private void ShowEmployeeInfo()
    {
        EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_employeejinjie1, gameObject.transform, null, (GameObject obj) => { obj.transform.localPosition = new Vector3(0, 0, -1000f); });
        EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_employeejinjie2, gameObject.transform);
        Employee curEmployee = null;

        curEmployee = GamePlayer.Instance.GetEmployeeById(employeeInstId);
        if (curEmployee == null)
        {
            return;
        }

        //GameManager.Instance.GetActorClone((ENTITY_ID) EmployeeData.GetData(curEmployee.GetIprop(PropertyType.PT_TableId)).asset_id,
        //   (ENTITY_ID)curEmployee.WeaponAssetID, EntityType.ET_Emplyee, AssetLoadCallBack, new ParamData(curEmployee.InstId),"UI");
        nameLab.text       = curEmployee.InstName;
        jobIcon.spriteName = ((JobType)curEmployee.GetIprop(PropertyType.PT_Profession)).ToString();
        profssLab.text     = Profession.get((JobType)curEmployee.GetIprop(PropertyType.PT_Profession),
                                            curEmployee.GetIprop(PropertyType.PT_ProfessionLevel)).jobName_;
        pinzhiImg.spriteName = getPinzhiImg((int)curEmployee.quality_);
        zhanliLab.text       = curEmployee.GetIprop(PropertyType.PT_FightingForce).ToString();
        hpLab.text           = curEmployee.GetIprop(PropertyType.PT_HpMax).ToString();
        spiritLab.text       = curEmployee.GetIprop(PropertyType.PT_Spirit).ToString();
        magicLab.text        = curEmployee.GetIprop(PropertyType.PT_MpMax).ToString();
        critLab.text         = curEmployee.GetIprop(PropertyType.PT_Crit).ToString();
        attLab.text          = curEmployee.GetIprop(PropertyType.PT_Attack).ToString();
        hitLab.text          = curEmployee.GetIprop(PropertyType.PT_Hit).ToString();
        defenseLab.text      = curEmployee.GetIprop(PropertyType.PT_Defense).ToString();
        dodgeLab.text        = curEmployee.GetIprop(PropertyType.PT_Dodge).ToString();
        agileLab.text        = curEmployee.GetIprop(PropertyType.PT_Agile).ToString();
        counterpunchLab.text = curEmployee.GetIprop(PropertyType.PT_counterpunch).ToString();
        replyLab.text        = curEmployee.GetIprop(PropertyType.PT_Reply).ToString();

        Employee oldEmployee = EmployessSystem.instance._OldEmployee;

        if (oldEmployee == null)
        {
            return;
        }
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_HpMax), oldEmployee.GetIprop(PropertyType.PT_HpMax), addSmLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_MpMax), oldEmployee.GetIprop(PropertyType.PT_MpMax), addMlLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Attack), oldEmployee.GetIprop(PropertyType.PT_Attack), addGjLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Defense), oldEmployee.GetIprop(PropertyType.PT_Defense), addFyLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Agile), oldEmployee.GetIprop(PropertyType.PT_Agile), addMjLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Reply), oldEmployee.GetIprop(PropertyType.PT_Reply), addHfLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Spirit), oldEmployee.GetIprop(PropertyType.PT_Spirit), addJsLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Crit), oldEmployee.GetIprop(PropertyType.PT_Crit), addBsLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Hit), oldEmployee.GetIprop(PropertyType.PT_Hit), addMzLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_Dodge), oldEmployee.GetIprop(PropertyType.PT_Dodge), addSbLab);
        ShowAddProp(curEmployee.GetIprop(PropertyType.PT_counterpunch), oldEmployee.GetIprop(PropertyType.PT_counterpunch), addFjLab);
    }
Exemple #23
0
        internal static void PopulateAssets()
        {
            if (mainAssetBundle == null)
            {
                using (var assetStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HenryMod.pleasechangethisnameinyourprojectorelseyouwillcauseconflicts"))
                {
                    mainAssetBundle = AssetBundle.LoadFromStream(assetStream);
                    var provider = new AssetBundleResourcesProvider("@Henry", mainAssetBundle);
                    ResourcesAPI.AddProvider(provider);
                }
            }

            using (Stream manifestResourceStream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("HenryMod.HenryBank.bnk"))
            {
                byte[] array = new byte[manifestResourceStream2.Length];
                manifestResourceStream2.Read(array, 0, array.Length);
                SoundAPI.SoundBanks.Add(array);
            }

            swordHitSoundEvent = CreateNetworkSoundEventDef("HenrySwordHit");
            punchHitSoundEvent = CreateNetworkSoundEventDef("HenryPunchHit");

            dustEffect          = LoadEffect("HenryDustEffect");
            bombExplosionEffect = LoadEffect("BombExplosionEffect");

            ShakeEmitter shakeEmitter = bombExplosionEffect.AddComponent <ShakeEmitter>();

            shakeEmitter.amplitudeTimeDecay             = true;
            shakeEmitter.duration                       = 0.5f;
            shakeEmitter.radius                         = 200f;
            shakeEmitter.scaleShakeRadiusWithLocalScale = false;

            shakeEmitter.wave = new Wave
            {
                amplitude   = 1f,
                frequency   = 40f,
                cycleOffset = 0f
            };

            swordSwingEffect     = Assets.LoadEffect("HenrySwordSwingEffect");
            swordHitImpactEffect = Assets.LoadEffect("ImpactHenrySlash");

            punchSwingEffect = Assets.LoadEffect("HenryFistSwingEffect");
            //punchImpactEffect = Assets.LoadEffect("ImpactHenryPunch");
            // on second thought my effect sucks so imma just clone loader's
            punchImpactEffect = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/Effects/OmniEffect/OmniImpactVFXLoader"), "ImpactHenryPunch");
            punchImpactEffect.AddComponent <NetworkIdentity>();

            EffectAPI.AddEffect(punchImpactEffect);
        }
Exemple #24
0
    void Start()
    {
        _EnterLable.text = LanguageManager.instance.GetValue("enter");
        nameLabel.transform.parent.gameObject.SetActive(false);
        babyTitle.gameObject.SetActive(false);
        huobanZhen.gameObject.SetActive(false);
        backSp.gameObject.SetActive(false);
        getTypeSp.gameObject.SetActive(false);
        CloseBtn.gameObject.SetActive(false);
        typeObj.SetActive(false);
        numObj.SetActive(false);
        gun1.gameObject.SetActive(false);
        gun2.gameObject.SetActive(false);
//        ShowGetBaby();
//        EffectAPI.PlayUIEffect(EFFECT_ID.EFFECT_GainBabyShine, transform, null, (GameObject obj) =>
//        {
//			if(!hasDestroy)
//			{
        //EffectLevel el = obj.AddComponent<EffectLevel>();
        //el.target = effLv;
//				GlobalInstanceFunction.Instance.Invoke(() =>
//				{
//					if(!hasDestroy)
//					{
        EffectAPI.PlayUIEffect(EFFECT_ID.EFFECT_GainBaby, transform, null, (GameObject go) =>
        {
            //EffectLevel el1 = go.AddComponent<EffectLevel>();
            //el1.target = effLv;
            GlobalInstanceFunction.Instance.Invoke(() =>
            {
                if (!hasDestroy)
                {
                    if (babyId != 0)
                    {
                        ShowGetBaby();
                    }
                    if (empId != 0)
                    {
                        ShowGetEmp();
                    }
                }
            }, 1.5f);
        });
//					}
//				}, 0.8f);
//			}
//        });
        UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0);
    }
Exemple #25
0
 private void OnClickcreateP(ButtonScript obj, object args, int param1, int param2)
 {
     RolePanelObj.SetActive(false);
     CreatePlayerRole.ani.SetInteger("cameraState", 1);
     backBtn.gameObject.SetActive(true);
     createP.gameObject.SetActive(false);
     SetinfoBtnState(false);
     isCreateB = true;
     CreatePlayerRole.isCreate = true;
     SetIconShowState(true);
     playerInfoObg.SetActive(false);
     cRole.ShowPlayerObj();
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_Butterfly, transform);
     SetPlayerObjActive(false);
 }
Exemple #26
0
    public static void AcceptQuestOk(COM_QuestInst quest)
    {
        NewQuest = true;
        InsertQuestInst(quest);
        UpdateAcceptableQuests();
        //AddTrackQues(quest);
        if (OnQuestUpdate != null)
        {
            OnQuestUpdate();
        }
        isDirty = true;

        GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_NpcRenwuAccept, quest.questId_);
        EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_AcceptQuest, ApplicationEntry.Instance.uiRoot.transform);
    }
Exemple #27
0
 private void OnSubmitDetail(ButtonScript obj, object args, int param1, int param2)
 {
     if (int.Parse(submitnum_.text) <= 0)
     {
         return;
     }
     NetConnection.Instance.presentGuildItem(int.Parse(submitnum_.text));
     EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_familyCaiji, gameObject.transform, null,
                            (GameObject obj1) => {
         if (!submitDetail_.activeSelf)
         {
             Destroy(obj1);
         }
     });
 }
Exemple #28
0
    void ExcuteCounter(COM_ReportActionCounter counter)
    {
        BattleActor caster = Battle.Instance.GetActorByInstId(counter.casterId_);

        BattleActor[] aim   = new BattleActor[] { Battle.Instance.GetActorByIdx((int)counter.targetPosition_) };
        SkillInst     skill = new SkillInst();

        EffectAPI.Play((EFFECT_ID)GlobalValue.EFFECT_Fanji, caster.ControlEntity.ActorObj.transform.position + caster.ControlEntity.ActorObj.transform.forward, null, null, null, (EffectInst inst, ParamData pData) =>
        {
            EffectAPI.Play((EFFECT_ID)GlobalValue.EFFECT_FanjiCast, caster.ControlEntity.ActorObj, null, null, (int iVal) =>
            {
                skill.Cast(GlobalValue.GetAttackID(caster), 1, caster, aim, new COM_ReportTarget[] { counter.props_ }, null, DealCounterAction, true);
            });
        });
    }
Exemple #29
0
    void OneByOneExcute(BattleActor aim, bool final = false)
    {
        Vector3 casterPos = caster_.ControlEntity.ActorObj.transform.position;

        // show skill effect
        if (final)
        {
            EffectAPI.Play((EFFECT_ID)crt_data_._EffectID, casterPos, ConvertV3(new BattleActor[] { aim }), GetPack(HitMotion_1, HitMotion_2, ShowHitEffect, PopChangeValue), ActionOver, SaveEffectInst, new ParamData(oboIdx++));
            caster_.ControlEntity.ClearSingBrustCallBack();
            caster_.ControlEntity.ClearSingCallBack();
        }
        else
        {
            EffectAPI.Play((EFFECT_ID)crt_data_._EffectID, casterPos, ConvertV3(new BattleActor[] { aim }), GetPack(HitMotion_1, HitMotion_2, ShowHitEffect, PopChangeValue), null, SaveEffectInst, new ParamData(oboIdx++));
        }
    }
Exemple #30
0
    public void UpdateOpenSystemStr(int str)
    {
        if (MainPanle.Instance == null)
        {
            return;
        }

        if (MainPanle.Instance.gameObject.activeSelf)
        {
            return;
        }
        if (str == (int)OpenSubSystemFlag.OSSF_EmployeePos10 || str == (int)OpenSubSystemFlag.OSSF_EmployeePos15 || str == (int)OpenSubSystemFlag.OSSF_EmployeePos20)
        {
            EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_kaiqihuoban, gameObject.transform, () => {});
        }
    }