void LateUpdate() { #if UNITY_ANDROID if (Input.GetKeyUp(KeyCode.Escape)) { OpenMessageBox(SupportString.GetString(1014), eUIMessageBoxButtonType.Type_Ok_Cancel, new UIMessageBox.ButtonCB(HomeButtonOkCB)); } #endif }
void LateUpdate() { #if UNITY_ANDROID if (Input.GetKeyUp(KeyCode.Escape)) { UIMessageBox.ButtonCB quitCB = new UIMessageBox.ButtonCB(SupportUtil.ApplicationQuit); OpenMessageBox(SupportString.GetString(3012), eUIMessageBoxButtonType.Type_Ok_Cancel, quitCB); } #endif }
void LateUpdate() { #if UNITY_ANDROID if (Input.GetKeyUp(KeyCode.Escape)) { UIMessageBox.ButtonCB quitCB = new UIMessageBox.ButtonCB(OnAndroidBack); OpenMessageBox(SupportString.GetString(100001), eUIMessageBoxButtonType.Type_Ok_Cancel, quitCB); } #endif Touch(); }
private IEnumerator Damage(DamageParam param) { for (int i = 0; i < param.num; i++) { if (status.CheckImmunity(param.type) == false) { SetDamage(param); } else { SetBuffText(SupportString.GetString(1026)); SetDamageEffect(param); } yield return(new WaitForSeconds(param.time)); } }
private IEnumerator AttackMode() { while (true) { switch (status.GetTable.attackType) { case eAttackType.Type_Normal: { Enemy targetEnemy = null; if (status.GetEnemyNormalType(out targetEnemy)) { if (spriteAnimator != null) { SpriteAnimator.MotionClearCB motionClearCB = new SpriteAnimator.MotionClearCB(AttackMotionCB); spriteAnimator.PlayAnimation(eAnimationType.Type_Attack, motionClearCB, targetEnemy); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } } break; case eAttackType.Type_Piercing: { List <Enemy> enemyList = null; if (status.GetEnemyPiercingType(out enemyList)) { if (spriteAnimator != null) { SpriteAnimator.MotionClearCB motionClearCB = new SpriteAnimator.MotionClearCB(AttackMotionCB); spriteAnimator.PlayAnimation(eAnimationType.Type_Attack, motionClearCB, enemyList); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } } break; case eAttackType.Type_Explosion: { Enemy targetEnemy = null; if (status.GetEnemyExplosionType(out targetEnemy)) { if (spriteAnimator != null) { SpriteAnimator.MotionClearCB motionClearCB = new SpriteAnimator.MotionClearCB(AttackMotionCB); spriteAnimator.PlayAnimation(eAnimationType.Type_Attack, motionClearCB, targetEnemy.transform); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } } break; case eAttackType.Type_Area: { List <Enemy> enemyList = null; if (status.GetEnemyAreaType(out enemyList)) { if (spriteAnimator != null) { SpriteAnimator.MotionClearCB motionClearCB = new SpriteAnimator.MotionClearCB(AttackMotionCB); spriteAnimator.PlayAnimation(eAnimationType.Type_Attack, motionClearCB, enemyList); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } } break; case eAttackType.Type_Slow: { if (spriteAnimator != null) { spriteAnimator.PlayAnimation(eAnimationType.Type_Idle, null); } List <Enemy> enemyList = null; if (status.GetEnemyAreaType(out enemyList)) { for (int i = 0; i < enemyList.Count; i++) { enemyList[i].AddBuff(new BuffParam(status.GetTable.towerType, -(status.GetDamage * 0.01f), status.GetTable.damageTime + Time.realtimeSinceStartup, eBuffType.Type_Move_Speed)); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } } break; case eAttackType.Type_Generator: { if (spriteAnimator != null) { spriteAnimator.PlayAnimation(eAnimationType.Type_Idle, null); } SetBuffText(SupportString.GetString(6200, "#@Value@#", string.Format("{0:n0}", status.GetDamage))); if (GameManager.Instance != null) { GameManager.Instance.AddGameGold(status.GetDamage); } yield return(new WaitForSeconds(status.GetAttackSpeed)); } break; } yield return(null); } }