예제 #1
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);
    }
예제 #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);
 }