// Weeds logic IEnumerator IllnessRoutine() { Weed.lastWeedCrush = swapEvent; Weed.seed = 0; int last_swapEvent = swapEvent; yield return(new WaitForSeconds(1f)); while (Weed.WeedCount > 0) { yield return(StartCoroutine(Utils.WaitFor(() => swapEvent > last_swapEvent && Weed.all != null && Weed.all.Count > 0, 0.1f))); last_swapEvent = swapEvent; yield return(StartCoroutine(Utils.WaitFor(CanIWait, 0.1f))); if (Weed.lastWeedCrush < swapEvent) { Weed.seed = 1; //swapEvent - Weed.lastWeedCrush; DebugUtil.Debug("Weed:" + Weed.seed); Weed.lastWeedCrush = swapEvent; } Weed.Grow(); } }
/// <summary> /// 播放boss受击或者死亡动画 /// </summary> /// <param name="bossId">Boss identifier.</param> /// <param name="isHit">If set to <c>true</c> is hit.</param> public void PlayBossAnim(int bossId, bool isHit) { if (!_dicBoss.ContainsKey(bossId)) { return; } Dragon dragon = _dicBoss[bossId]; if (dragon != null) { //飘血 PlayHpFlying(); if (isHit) { // dragon.IsPlayHitAnim = true; dragon.PlayAnim(Dragon.E_DragonAnim.get_hit_front); //Boss Skill bool isTriggerBossSkill = ModuleFight.IsTriggerBossSkill(bossId); if (isTriggerBossSkill) { switch (bossId) { case 1: //1.BOSS每受到一次攻击会对敌方区域放置一个障碍。 FieldAssistant.Instance.CreateOneBlock(); // FieldAssistant.Instance.CreateRowBlock(); // FieldAssistant.Instance.CreateNotDestroyableBlcok(); break; case 2: //2.BOSS每损失10%血对敌方区域放置一排5个障碍。 FieldAssistant.Instance.CreateRowBlock(); break; case 3: //3.BOSS每掉20%血,对敌方区域放置2个无法消除的障碍,BOSS死亡后障碍消失 FieldAssistant.Instance.CreateNotDestroyableBlcok(); break; default: // FieldAssistant.Instance.CreateRowBlock(); break; } } } else { DebugUtil.Debug("Boss is died,bossId:" + bossId); dragon.IsDead = true; dragon.PlayAnim(Dragon.E_DragonAnim.get_hit_front); // dragon.PlayAnim(Dragon.E_DragonAnim.die); MusicManager.Instance.PlaySoundEff("Music/KillBoss"); FieldAssistant.Instance.StartCoroutine(FieldAssistant.Instance.ChangeNextScene()); } } }
public static void Createini() { Dictionary <string, string> dic = new Dictionary <string, string>(); string pathRes = Application.dataPath + "/Resources/"; string pathIni = pathRes + "/res.txt"; if (File.Exists(pathIni)) { File.Delete(pathIni); } CreateResInfo(pathRes, ref dic); List <string> list = new List <string>(); foreach (KeyValuePair <string, string> keyValue in dic) { list.Add(keyValue.Key + "=" + keyValue.Value); } File.WriteAllLines(pathRes + "/res.txt", list.ToArray()); DebugUtil.Debug("生成完毕 "); AssetDatabase.Refresh(); }
void OnUILoaded(BaseUI ui) { DebugUtil.Debug("ui loaded:" + ui.GetUIType()); }