/// <summary>
    /// on start get a ref to :
    /// 1) cannonText label
    /// 2) The Boss of this gun
    /// </summary>
    void Start()
    {
        MaxHits      = MaxHits + Context.LevelNum;
        myparentBone = transform.parent;

        cannonText_trans = transform.FindChild("CannonHealthLabel");
        //run up the chain of parents :)
        Boss_body = this.transform;
        while (Boss_body.GetComponent <Boss_3d_wordGen>() == null)
        {
            Boss_body = Boss_body.parent;
            //Debug.Log("Iam" + parentalunit);
        }
        //Debug.Log("Iam LAST " + parentalunit);
        //the boss body was found , now get the script that's attached to it
        bossWordGenScript = Boss_body.GetComponent <Boss_3d_wordGen>();
    }
示例#2
0
    /// <summary>
    /// on start get a ref to :
    /// 1) cannonText label
    /// 2) The Boss of this gun
    /// </summary>
    void Start()
    {
        cannonText_trans = transform.FindChild("CannonHEalthLabel");

        bossWordGenScript = GameObject.Find("Boss_V4_prefab").GetComponent <Boss_3d_wordGen>();
    }