private IEnumerator _takeBell(BossBell bell) { State = GooseState.Attack; //Воспроизведение анимации атаки _animator.SetInteger("GooseState", (int)State); yield return(new WaitForSeconds(AttackSpeed / 2)); bell.GetDamage(Damage); yield return(new WaitForSeconds(AttackSpeed / 2)); State = GooseState.Walk; _animator.SetInteger("GooseState", (int)State); _animator.SetBool("WithBell", true); }
private void _spawnBell(Vector3 position) { var bellObject = GameObject.Instantiate(_towerPrefabs[10], position, Quaternion.identity, _battlefield); bellObject.transform.tag = "Tower"; Vector3 mutatedPosition = bellObject.transform.position; mutatedPosition.z = -3 + Mathf.Abs(mutatedPosition.y / 10) + 0.1f; bellObject.transform.position = mutatedPosition; _bell = bellObject.GetComponent <BossBell>(); _bell.Destroyed += onBellDestroyed; _bell.Initialize(_colocolStats.MaxHP); _targets.Add(_bell); }
public void TakeBell(BossBell bell) { StartCoroutine(_takeBell(bell)); }