// Use this for initialization
    void Start()
    {
        VelX       = 0;
        VelY       = 0;
        MaxX       = 6;
        timerMax   = 15;
        timerMult  = 2f;
        jumpCharge = 1;
        jumpMax    = 1;
        MaxY       = 10;

        myCollider = GetComponent <Collider2D>();   //sets a variable (myCollider) to the objects Collider
                                                    //so we do not have to keep getting the component below
        myRigidbody = GetComponent <Rigidbody2D>(); //sets a variable (myRigidbody) to the objects Rigidbody
                                                    //so we do not have to keep getting the component below

        mySpriteRenderer = GetComponent <SpriteRenderer>();
        ammoControl      = FindObjectOfType <AmmoBarControl>();
        healthControl    = FindObjectOfType <HealthBarControl>();
        gotStake         = false;
        bossHealth       = 4;

        m_Scene   = SceneManager.GetActiveScene();
        sceneName = m_Scene.name;
    }
Beispiel #2
0
    void Start()
    {
        //Movement
        VelX       = 0;
        VelY       = 0;
        MaxX       = 10;
        timerMax   = 15;
        timerMult  = 2f;
        jumpCharge = 1;
        jumpMax    = 1;
        MaxY       = 17;

        //Animation
        mySpriteRenderer = GetComponent <SpriteRenderer>();

        //Combat
        ammoControl = FindObjectOfType <AmmoBarControl>();
        gotStake    = false;
    }