Example #1
0
    // Use this for initialization
    public void Initialise()
    {
        soundmonstre = GetComponent <monstreSoundsScript>();

        switch (typeMonstre)
        {
        case 1:
            puissance    = 3;
            pv           = 3;
            vitesse      = 5;
            jumpForceMOB = 3;
            break;

        case 2:
            puissance    = 7;
            pv           = 10;
            vitesse      = 4;
            jumpForceMOB = 5;
            break;

        case 3:
            puissance    = 10;
            pv           = 15;
            vitesse      = 3;
            jumpForceMOB = 0;
            break;
        }
        facingRight = -1;
        compteur    = -1;
        focus       = false;

        direction_epee = GameObject.Find("Hero").GetComponent <MoveHeroScript>();
    }
Example #2
0
 void Start()
 {
     soundmonstre = GetComponent <monstreSoundsScript>();
     GetComponent <monstreScript>().Initialise();
     levelScript = GameObject.Find("Hero").GetComponent <levelHeroScript>();
     soundHero   = GameObject.Find("Hero").GetComponent <soundsScriptHero>();
     Debug.Log(GetComponent <monstreScript>().getPower());
     puissance = GetComponent <monstreScript>().getPower();
     mtype     = GetComponent <monstreScript>().getMType();
     ok_baby   = true;
 }