Exemplo n.º 1
0
    void Start()
    {
        instance = this;

        collider  = gameObject.GetComponent <CapsuleCollider>();
        audio     = this.GetComponent <AudioSource>();
        rigidbody = this.GetComponent <Rigidbody>();
    }
Exemplo n.º 2
0
    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;
    }
Exemplo n.º 3
0
    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;
    }
Exemplo n.º 4
0
 void Start()
 {
     instance      = this;
     footstepSound = GetComponent <AudioSource>();
     collider      = gameObject.GetComponent <CapsuleCollider>();
 }
Exemplo n.º 5
0
    void Start()
    {
        instance = this;

        //collider = gameObject.GetComponent< CapsuleCollider >();
    }