public override void BasicAttack() //minotaur Attacks { if (!_attacking) { _curAttack = ChooseAttack(); _attacking = true; } else { switch (_curAttack) { case (MinotaurAttack.Poke): Poke(); break; case (MinotaurAttack.Axe): AxeAttack(); break; case (MinotaurAttack.FloorHit): FloorHit(); break; case (MinotaurAttack.Spin): Spin(); break; case (MinotaurAttack.Dash): Debug.Log("the bug is on the table"); StartHoldToDash(); break; } } }
// Start is called before the first frame update void Start() { //roar = true; enemyDamage = GetComponent <EnemyDamage>(); enemyAttack = GetComponent <MinotaurAttack>(); target = PlayerManager.instance.player.transform; agent = GetComponent <NavMeshAgent>(); animator = GetComponent <Animator>(); }
private void ChooseSpin() { if (!_spin) { _spin = true; _curAttack = MinotaurAttack.Spin; } else { _attacking = false; _spin = false; } }
private void ChooseHitFloor() { if (!_floorHit) { _floorHit = true; _curAttack = MinotaurAttack.FloorHit; } else { _attacking = false; _floorHit = false; } }
public override void Initialize() { priorityInType = 2; coll = GetComponent <CapsuleCollider2D>(); movementComponent = GetComponent <MovementMinotaur>(); if (movementComponent == null) { Debug.LogError("在Witcher中,没有找到Movement脚本!"); } attackComponent = GetComponent <MinotaurAttack>(); if (attackComponent == null) { Debug.LogError("在Witcher中,没有找到Attack脚本!"); } defenceComponent = GetComponent <DefenceEnemies>(); if (defenceComponent == null) { Debug.LogError("在Witcher中,没有找到Defence脚本!"); } //设置最大生命值 defenceComponent.Initialize(100); }