// Use this for initialization
 void Awake()
 {
     CharacterController = GetComponent("CharacterController") as CharacterController;
     Instance            = this;
     //TP_Camera.AttachCamera();
     _transform = transform;
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        level   = GameObject.FindWithTag("Player").GetComponent <lvlUp> ();
        player1 = GameObject.FindWithTag("Player").GetComponent <TP_Controler> ();

        layer         = LayerMask.GetMask("Player");
        CurrentHealth = MaxHealth;
        anim          = GetComponent <Animation> ();
        anim.Play("fight idle break");
        anim.PlayQueued("run");
    }
Exemplo n.º 3
0
    void Start()
    {
        hitted = GameObject.FindGameObjectWithTag("Hitted").GetComponent <AudioSource>();

        player1  = GameObject.Find("Character").GetComponent <TP_Controler> ();
        player   = GameObject.Find("Character").GetComponent <PlayerHealth>();
        level    = GameObject.Find("Character").GetComponent <lvlUp>();
        dropdown = GameObject.Find("DropDown");

        layer         = LayerMask.GetMask("Character");
        isDied        = false;
        currentHealth = StartingHealth;
        anim          = GetComponent <Animation> ();
        anim.Play("idle break 2");
        anim.PlayQueued("walk");
    }