Exemple #1
0
    void Awake()
    {
        anim          = GetComponent <Animator>();
        guiHealthbar  = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(0).gameObject;
        guiKills      = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(1).gameObject;
        guiDeaths     = this.gameObject.transform.GetChild(3).GetChild(1).GetChild(2).gameObject;
        guiStaminaBar = this.gameObject.transform.GetChild(3).GetChild(2).GetChild(0).gameObject;

        cameraScript          = GetComponent <ThirdPersonCameraNET>();
        controllerScript      = GetComponent <ThirdPersonControllerNET>();
        characterController   = GetComponent <CharacterController>();
        mecanim_Control_Melee = GetComponent <Mecanim_Control_melee>();

        //New Scripts
        playerHealth = GetComponent <PlayerHealth>();
        blocking     = GetComponent <Blocking>();
    }
 public void Start()
 {
     GameObject controllerObject = GameObject.FindGameObjectWithTag ("Player");
     player = controllerObject.GetComponent<Mecanim_Control_melee> ();
 }