Inheritance: UnityEngine.MonoBehaviour
Ejemplo n.º 1
0
        void Awake()
        {
            healthDisplay = transform.Find("Health").GetComponent <TextMesh>();
            anim          = GetComponent <Animator>();
            Transform rightHand = anim.GetBoneTransform(HumanBodyBones.RightHand);

            saber     = rightHand.Find("LSaber/Beam").gameObject;
            saberCont = rightHand.GetComponentInChildren <SaberController>();
            rb        = GetComponent <Rigidbody>();
            health    = MAX_HEALTH;
        }
Ejemplo n.º 2
0
 void Awake()
 {
     healthDisplay = transform.Find("Health").GetComponent<TextMesh>();
     anim = GetComponent<Animator>();
     Transform rightHand = anim.GetBoneTransform(HumanBodyBones.RightHand);
     saber = rightHand.Find("LSaber/Beam").gameObject;
     saberCont = rightHand.GetComponentInChildren<SaberController>();
     rb = GetComponent<Rigidbody>();
     health = MAX_HEALTH;
 }