void Start() { instance = this; collider = gameObject.GetComponent <CapsuleCollider>(); audio = this.GetComponent <AudioSource>(); rigidbody = this.GetComponent <Rigidbody>(); }
bool damaged; // True when the player gets damaged. void Awake() { // Setting up the references. anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <physicWalk> (); playerShooting = GetComponentInChildren <PlayerShooting> (); // Set the initial health of the player. currentHealth = startingHealth; }
void Awake() { // Setting up the references. anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <physicWalk> (); playerShooting = GetComponentInChildren <PlayerShooting> (); // Set the initial health of the player. currentHealth = startingHealth; }
void Start() { instance = this; footstepSound = GetComponent <AudioSource>(); collider = gameObject.GetComponent <CapsuleCollider>(); }
void Start() { instance = this; //collider = gameObject.GetComponent< CapsuleCollider >(); }