Exemple #1
0
 void Start()
 {
     anim   = GetComponent <Animator>();
     perso  = GetComponent <Rigidbody2D>();
     speed2 = speed;
     poing  = GetComponent <Poing>();
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        script_IA3 = GetComponent <IA_3>();
        anim       = GetComponent <Animator>();
        rb         = GetComponent <Rigidbody2D>();
        spriite    = GetComponent <SpriteRenderer>();
        health_bar_rouge.transform.localScale = new Vector2(starting_life, health_bar.transform.localScale.y);
        GameObject player = GameObject.Find("perso 1");

        perso = player.transform;
        poing = perso.GetComponent <Poing>();
        GameObject music2 = GameObject.Find("get_hit");

        hurt = music2.GetComponent <AudioSource>();
        GameObject music = GameObject.Find("adv1_meurt");

        mort = music.GetComponent <AudioSource>();
        GameObject le_score = GameObject.Find("txt_Score");

        score = le_score.GetComponent <Score>();
        GameObject Panel = GameObject.Find("bleu");

        panel_score_fin = Panel.GetComponent <Panel_score_fin>();
        // InvokeRepeating("techPlusUn",0,1);
    }
Exemple #3
0
    void Start()
    {
        anim        = GetComponent <Animator>();
        perso       = GetComponent <Rigidbody2D>();
        coll        = GetComponent <CapsuleCollider2D>();
        groundCheck = this.gameObject.transform.GetChild(0);
        poing       = GetComponent <Poing>();
        GameObject music = GameObject.Find("jump");

        jumpSound = music.GetComponent <AudioSource>();
    }