public override void BeginState() { base.BeginState(); Vector3 direction = (_manager.PlayerCapsule.transform.forward).normalized; direction.y = 0; if (_manager.CurrentAttackType != AttackType.SKILL2) { try { StartCoroutine(GameLib.Blinking(_manager.materialList, Color.white)); } catch { } } if (!PlayerFSMManager.Instance.isSkill4) { var voice = _manager.sound.monsterVoice; voice.PlayMonsterVoice(this.gameObject, voice.redhatDamegedVoice); } _manager.agent.acceleration = 0; _manager.agent.velocity = Vector3.zero; }
public void OnTriggerEnter(Collider other) { if (other.transform.tag == "MonsterWeapon") { if (GameStatus.currentGameState != CurrentGameState.Product) { hp -= damage; } if (hp > 0) { StartCoroutine(GameLib.Blinking(materials, Color.white, hitTimes, hitDuration)); anim.Play("Hit"); } } }
public override void BeginState() { base.BeginState(); Vector3 direction = (_manager.PlayerCapsule.transform.forward).normalized; direction.y = 0; try { StartCoroutine(GameLib.Blinking(_manager.materialList, Color.white)); } catch { } var voice = _manager.sound.monsterVoice; voice.PlayMonsterVoice(this.gameObject, voice.macDamageVoice); _manager.agent.acceleration = 0; _manager.agent.velocity = Vector3.zero; }
public void OnHitForBoss(AttackType attackType) { if ((attackType == AttackType.ATTACK1 || attackType == AttackType.ATTACK2 || attackType == AttackType.ATTACK3) && ((int)riris.CurrentAttackType & (int)attackType) != 0) { return; } if (riris.CurrentState == RirisState.DEAD) { return; } if (PlayerFSMManager.Instance.isNormal) { PlayerEffects.Instance.basicNormal.ItemSetActive(riris.Pevis, "Effect"); } if (!PlayerFSMManager.Instance.isNormal) { PlayerEffects.Instance.basicSpecial.ItemSetActive(riris.Pevis, "Effect"); } riris.CurrentAttackType = attackType; int value = GameLib.TransformTypeToInt(attackType); PlayerStat playerStat = PlayerFSMManager.Instance.Stat; float damage = (playerStat.GetStr() * playerStat.dmgCoefficient[value] * 0.01f); if (damage <= 10.0f) { damage = 10.0f; } StartCoroutine(display.DamageDisplaying(damage)); //riris.Stat.TakeDamage(playerStat, damage); CharacterStat.ProcessDamage(playerStat, riris.Stat, damage); if (MCSoundManager.SoundCall >= MCSoundManager.SoundSkill3Break) { var sound = GetComponentInParent <MonsterSound>().monsterSFX; sound.PlayMonsterSFX(this.gameObject, sound.attackSFX[value]); if (attackType == AttackType.SKILL3) { MCSoundManager.SoundCall = 0; } } //SetKnockBack(playerStat, value); Invoke("AttackSupport", 0.5f); if (attackType == AttackType.ATTACK1) { StartCoroutine(Shake.instance.ShakeCamera(0.03f, 0.04f, 0.1f)); } if (attackType == AttackType.ATTACK2) { StartCoroutine(Shake.instance.ShakeCamera(0.03f, 0.04f, 0.1f)); } if (attackType == AttackType.ATTACK3) { StartCoroutine(Shake.instance.ShakeCamera(0.07f, 0.07f, 0.1f)); } if (attackType == AttackType.SKILL1) { StartCoroutine(Shake.instance.ShakeCamera(0.05f, 0.1f, 0.1f)); } if (attackType == AttackType.SKILL2) { StartCoroutine(Shake.instance.ShakeCamera(0.15f, 0.1f, 0.1f)); } //if (attackType == AttackType.SKILL3) // StartCoroutine(Shake.instance.ShakeCamera(0.01f, 0.01f, 0.01f)); if (riris.Stat.Hp > 0) { if (damage > 0) { StartCoroutine(GameLib.Blinking(riris.materials, Color.white)); } } else { riris.SetDeadState(); StopAllCoroutines(); } }