Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        lootdrop   = Random.Range(1, 100);
        dropchance = Random.Range(1, 2);

        //gets animator
        myAnimator = GetComponent <Animator>();

        myBody = GetComponent <Rigidbody2D>();

        //invunerability timer and target
        invulnertarget = 0.0f;
        invulnertimer  = 0.0f;
        //knockback script
        struck = GetComponent <KNCKBCK_SCRIPT>();
    }
Exemplo n.º 2
0
    // Start is called before the first frame update

    void Start()
    {
        isLeft = false;
        //gets coin save
        coin = PlayerPrefs.GetInt("newcoin");
        //gets fireunlocked save
        fireunlock = PlayerPrefs.GetInt("unlocked");
        //death timer target
        deathtimertarget = 5.0f;
        //invunerability timer target
        invulnertarget = 0.0f;
        //invunerability timer start
        invulnertimer = 0.0f;
        //how rigid bodys obtained
        myBody = GetComponent <Rigidbody2D>();
        //how the sprites transfer
        mySprite = GetComponent <SpriteRenderer>();
        //how knockbacks obtained
        struck = GetComponent <KNCKBCK_SCRIPT>();
    }