Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        currentHealth = totalHealth;
        isAlive       = true;

        inventory                = GetComponent <Inventory>();
        m_actorEquipment         = GetComponent <Actor_Equipment>();
        m_physicsAnimation_Human = GetComponent <PhysicsAnimation_Human>();
    }
 private void Start()
 {
     // get the transform of the main camera
     if (Camera.main != null)
     {
         m_Cam = Camera.main.transform;
     }
     else
     {
         Debug.LogWarning(
             "Warning: no main camera found. Third person character needs a Camera tagged \"MainCamera\", for camera-relative controls.", gameObject);
         // we use self-relative controls in this case, which probably isn't what the user wants, but hey, we warned them!
     }
     human   = GetComponent <PhysicsAnimation_Human>();
     m_actor = GetComponent <Actor>();
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     human = GetComponent <PhysicsAnimation_Human>();
 }