void Update() { characterActions.ChangeVelocity(new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), 0.0f), Input.GetAxisRaw("Run") != 0.0f); if (Input.GetAxisRaw("Menu") != 0.0f) { activeSceneManager.SceneChange("Menu", Vector3.zero, Vector3.zero, true); } if (Input.GetAxisRaw("Fire2") != 0.0f) { characterActions.Throw(throwable, transform.position, transform.rotation); } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player" && collision is BoxCollider2D) { activeSceneManager.SceneChange(sceneToLoad, spawn, facing); } }