// Use this for initialization void Start() { health = gameObject.GetComponent <Health> (); health.enabled = false; if (weapon) { weapon = Instantiate(weapon, new Vector3(this.transform.position.x, this.transform.position.y, 0), this.transform.rotation) as Weapon; weapon.transform.SetParent(this.transform); weapon.enabled = false; } testBossAI = this.GetComponent <TestBossAI> (); testBossAI.enabled = false; spriterenderer = this.GetComponent <SpriteRenderer> (); }
// Use this for initialization void Start() { health = gameObject.GetComponent<Health> (); health.enabled = false; if (weapon) { weapon = Instantiate (weapon, new Vector3 (this.transform.position.x, this.transform.position.y, 0), this.transform.rotation) as Weapon; weapon.transform.SetParent (this.transform); weapon.enabled = false; } testBossAI = this.GetComponent<TestBossAI> (); testBossAI.enabled = false; spriterenderer = this.GetComponent<SpriteRenderer> (); }