private void Start() { rigidbody = GetComponent <Rigidbody>(); enemyPattern = gameObject.GetComponent <EnemyAttackPattern>(); maxLife = 5; GameMediator.Instance.DoGameOver += new GameMediator.DoGameOverDelegate(Died); SetEnemyInfo(); }
public void Start() { this.BossHealth = (BossHealth)FindObjectsOfType(typeof(BossHealth))[0]; this.phase = 0; this.counter = 0.0f; this.currentPattern = this.GetComponent <CentaurChargeWithoutAura>(); this.currentPattern.startAttackPattern(); }
public void Update() { this.counter += Time.deltaTime; if (BossHealth.hp / BossHealth.maxHp <= 0.66f && this.phase == 0) { this.currentPattern.stopAttackPattern(); this.counter = 0.0f; this.phase = 1; this.currentPattern = this.GetComponent <CentaurCharge>(); this.currentPattern.startAttackPattern(); } if (BossHealth.hp / BossHealth.maxHp <= 0.25f && this.phase == 1) { this.currentPattern.stopAttackPattern(); this.counter = 0.0f; this.phase = 2; this.currentPattern = this.GetComponent <CentaurCharge>(); CentaurCharge centaurCharge = (CentaurCharge)this.currentPattern; centaurCharge.standingPosition = centaurCharge.standingPosition - this.cloneSpawnPoint; centaurCharge.onStand.subscribe(this.spawnClone); this.currentPattern.startAttackPattern(); } }
public void Start() { this.currentPattern = this.GetComponent <CentaurCharge>(); this.currentPattern.startAttackPattern(); }