示例#1
0
 void Awake()
 {
     // Setting up the references.
     player = GameObject.FindGameObjectWithTag ("Player");
     audioSource = GetComponent <AudioSource> ();
     playerHealth = player.GetComponent <PlayerHealth> ();
     playerLevel = player.GetComponent <PlayerLevel> ();
 }
示例#2
0
 void Awake()
 {
     // Setting up the references.
     anim = GetComponent <Animator> ();
     playerAudio = GetComponent <AudioSource> ();
     //hitParticles = GetComponentInChildren <ParticleSystem> ();
     thirdPersonCharacter = GetComponentInChildren <ThirdPersonCharacter> ();
     playerLevel = GetComponent <PlayerLevel> ();
     playerPunch = GetComponentInChildren <PlayerPunch> ();
     playerKick  = GetComponentInChildren <PlayerKick> ();
     // Set the initial health of the player.
     currentHealth = startingHealth;
 }
 // Use this for initialization
 void Start()
 {
     playerLevel = GetComponent<PlayerLevel> ();
 }
示例#4
0
 //
 //        void Start ()
 //        {
 //            
 //            //rb = GetComponent<Rigidbody>();
 //
 //        
 //            damageTextMesh.text = "";
 //
 //        }
 void Awake()
 {
     // Setting up the references.
     anim = GetComponent <Animator> ();
     //textAnim = GetComponentInChildren <Animator> ();
     enemyAudio = GetComponent <AudioSource> ();
     hitParticles = GetComponentInChildren <ParticleSystem> ();
     capsuleCollider = GetComponent <CapsuleCollider> ();
     //textMesh = GetComponent <TextMesh> ();
     player = GameObject.FindGameObjectWithTag ("Player");
     playerLevel = player.GetComponent <PlayerLevel> ();
     //canvas = GameObject.FindGameObjectWithTag ("EnemyCanvas");
     //textAnim = canvas.GetComponent <Animator> ();
     // Setting the current health when the enemy first spawns.
     currentHealth = startingHealth;
 }