public override void enter(Boss_controller body) { base.enter(body); counter = duration; body.myAnimator.Play("Boss_attack1"); }
public override void loop(Boss_controller body) { base.loop(body); //rotate according to player if (body.player != null && body.player.gameObject.transform.position.x > transform.position.x) { transform.localScale = new Vector3(Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z); } else { transform.localScale = new Vector3(-Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z); } if (body.player != null && Mathf.Abs(body.player.gameObject.transform.position.x - transform.position.x) > 10) { body.changeState(body.state_attack3); } else { float num = Random.Range(0, 2); if (num < 1) { body.changeState(body.state_attack1); } else { body.changeState(body.state_attack2); } } }
public override void leave(Boss_controller body) { base.leave(body); hitbox1.deactivate(); hitbox2.deactivate(); body.myAnimator.Play("Boss_idle"); }
public override void enter(Boss_controller body) { base.enter(body); counter = duration; body.fist1.transform.localScale = new Vector3(body.fist1.transform.localScale.x * -1, body.fist1.transform.localScale.y, body.fist1.transform.localScale.z); body.myAnimator.Play("Boss_attack2"); }
public override void loop(Boss_controller body) { base.loop(body); counter -= Time.deltaTime; if (At(counter, duration - 0.75f)) { hitbox.gameObject.SetActive(true); } if (At(counter, duration - 1.25f)) { hitbox.deactivate(); } if (counter <= 0) { body.changeState(body.state_attack3); } }
public override void enter(Boss_controller body) { base.enter(body); }
public override void leave(Boss_controller body) { base.leave(body); }
public virtual void enter(Boss_controller body) { body.fist1.transform.localScale = new Vector3(Mathf.Abs(body.fist1.transform.localScale.x) * Mathf.Sign(this.transform.localScale.x), body.fist1.transform.localScale.y, body.fist1.transform.localScale.z); body.fist2.transform.localScale = new Vector3(Mathf.Abs(body.fist2.transform.localScale.x) * Mathf.Sign(this.transform.localScale.x), body.fist2.transform.localScale.y, body.fist2.transform.localScale.z); }
public virtual void leave(Boss_controller body) { }
public virtual void loop(Boss_controller body) { }