Exemple #1
0
    void Start()
    {
        #region variables declared
        speed    = 7f;
        movement = 0f;
        #endregion

        #region Getting components
        SRender = GetComponent <SpriteRenderer>();
        myHP    = GetComponent <PlayerHealth>();
        rigid   = GetComponent <Rigidbody2D>();
        scenes  = GetComponent <LevelColl>();
        mcoll   = GetComponent <Collider2D>();
        stats   = GetComponent <Stats>();
        hang    = GetComponent <Hanging>();
        #endregion

        #region Level System
        LevelSystem levelSystem = new LevelSystem();
        #endregion

        DontDestroyOnLoad(this.gameObject);

        inventory = new Inventory();
    }
Exemple #2
0
    private void Awake()
    {
        playerRoar     = GetComponent <PlayerRoar>();
        playerHealth   = GetComponent <PlayerHealth>();
        playerMovement = GetComponent <PlayerMovement>();
        hanging        = GetComponent <Hanging>();
        anim           = GetComponent <Animator>();

        rb2d = GetComponent <Rigidbody2D>();

        idle();
    }