Ejemplo n.º 1
0
    // 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> ();
    }
Ejemplo n.º 2
0
    // 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> ();
    }