// Use this for initialization void Awake() { ui = FindObjectOfType <FlyUI>(); giv = FindObjectOfType <GiveEnemy>(); gt = FindObjectOfType <GetThing>(); au = FindObjectOfType <MusicAll>(); }
void BossDie() { GetComponent <Collider2D>().enabled = false; if (FlyUI.scoreAdd != null) { FlyUI.scoreAdd(lastScore); } gt.GetThings(transform.position, Random.Range(0, 10)); Destroy(this.gameObject); }
public void Die() { GetComponent <Collider2D>().enabled = false; if (FlyUI.scoreAdd != null) { FlyUI.scoreAdd(enemyScore); } GetEnemy.Instance.enemys.Remove(this); gt.GetThings(transform.position, Random.Range(0, 10)); Destroy(this.gameObject); }
void Start() { ui = FindObjectOfType <FlyUI>(); FlyUI.scoreAdd += this.AddScore; FlyUI.dieAdd += this.AddDie; Vector3 rect = Camera.main.ScreenToWorldPoint(new Vector2(Screen.width, Screen.height)); halfBoardX = this.GetComponent <Renderer>().bounds.size.x / 4; halfBoardY = this.GetComponent <Renderer>().bounds.size.y / 4; maxX = rect.x - halfBoardX; maxY = rect.y - halfBoardY; }
public void Hurt(int damage) { if (hp > 0) { hp -= damage; if (FlyUI.scoreAdd != null) { FlyUI.scoreAdd(damage * 4); } if (hp <= 0) { PlayEffect(); BossDie(); giv.isNull = true; au.Bgm(3); ui.winOrNext(); } } }
public void Hurt(int damage) { if (hp > 0) { hp -= damage; GetHelp(); if (FlyUI.scoreAdd != null) { FlyUI.scoreAdd(damage * 2); } if (hp <= 0) { PlayEffect(); BossDie(); giv.isNull = true; au.Bgm(0); } } }
// Use this for initialization void Start() { ui = FindObjectOfType <FlyUI>(); ui.BigBoomNum(num); }