Ejemplo n.º 1
0
        IEnumerator BtnRemberTimeDown()
        {
            while (true)
            {
                if (RememberBtn != null)
                {
                    if (RememberBtn.BtnMemTime > 0)
                    {
                        RememberBtn.BtnMemTime -= Time.deltaTime;
                        switch (RememberBtn.BtnRememberType)
                        {
                        case SkillBtnRemember.RememberBtnType.NormalSkillBtn:
                            if (PlayerManager.Instance.OnRememberNormalPress())
                            {
                                StopCoroutine("BtnRemberTimeDown");
                                RememberBtn.ShowRememberEff(false);
                                RememberBtn.BtnMemTime = 0;
                                RememberBtn            = null;
                                PlayerManager.Instance.NormalAttackRemembering = false;
                            }
                            break;

                        case SkillBtnRemember.RememberBtnType.ScrollBtn:
                        case SkillBtnRemember.RememberBtnType.ExplosiveBtn:
                        case SkillBtnRemember.RememberBtnType.LoreBtn:
                        case SkillBtnRemember.RememberBtnType.SkillBtn:
                            if (RememberBtn.GetComponent <BattleSkillButton>().ButtonClickWithRet(null))
                            {
                                StopCoroutine("BtnRemberTimeDown");
                                RememberBtn.ShowRememberEff(false);
                                RememberBtn.BtnMemTime = 0;
                                RememberBtn            = null;
                            }
                            //else
                            //{
                            //Debug.Log(RememberBtn.name+" Fire:"+false);
                            //}
                            break;
                        }
                    }
                    else
                    {
                        StopCoroutine("BtnRemberTimeDown");
                        RememberBtn.ShowRememberEff(false);
                        RememberBtn.BtnMemTime = 0;
                        RememberBtn            = null;
                    }
                }
                else
                {
                    StopCoroutine("BtnRemberTimeDown");
                }
                yield return(null);
            }
        }