GeoJam2021/Assets/Scripts/MenuPlay.cs

28 lines
665 B
C#
Raw Normal View History

2021-07-22 20:09:52 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MenuPlay : MonoBehaviour
{
public LayerMask contactFilter;
2021-07-22 21:52:18 +02:00
public AudioSource sfx;
2021-07-22 20:09:52 +02:00
public MenuMouse mouse;
// Start is called before the first frame update
void Start()
{
Cursor.visible = false;
}
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0)){
if(Physics2D.CircleCast(mouse.pos, 1f, Vector2.zero, 0f, contactFilter)){
2021-07-22 21:52:18 +02:00
sfx.Play();
2021-07-22 20:09:52 +02:00
SceneManager.LoadScene("Tutorial");
}
}
}
}