t1 / TFDContents / Assets / 01.Script / GestureManager.cs @ 11
이력 | 보기 | 이력해설 | 다운로드 (1.65 KB)
1 | 11 | YCH | using System.Collections; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using UnityEngine; |
||
4 | using UnityEngine.SceneManagement; |
||
5 | |||
6 | |||
7 | |||
8 | public class GestureManager : MonoBehaviour { |
||
9 | int scene; |
||
10 | |||
11 | void Start() |
||
12 | { |
||
13 | scene = SceneManager.GetActiveScene().buildIndex; |
||
14 | } |
||
15 | void Update () |
||
16 | { |
||
17 | if (Input.GetKeyDown(KeyCode.L)) // 좌클릭 |
||
18 | { |
||
19 | if (scene == 2) // 오브젝트/모델뷰 선택 |
||
20 | { |
||
21 | SceneManager.LoadScene(3); |
||
22 | } |
||
23 | if (scene == 3) // 성별 선택 |
||
24 | { |
||
25 | } |
||
26 | } |
||
27 | if (Input.GetKeyDown(KeyCode.R)) //우클릭 |
||
28 | { |
||
29 | if (scene == 2) // 오브젝트/모델뷰 선택 |
||
30 | { |
||
31 | // SceneManager.LoadScene(4); |
||
32 | } |
||
33 | if (scene == 3) // 성별 선택 |
||
34 | { |
||
35 | } |
||
36 | } |
||
37 | if (Input.GetKeyDown(KeyCode.F)) // 좌넘김 |
||
38 | { |
||
39 | } |
||
40 | if (Input.GetKeyDown(KeyCode.B)) //우넘김 |
||
41 | { |
||
42 | } |
||
43 | if (Input.GetKeyDown(KeyCode.E)) //처음화면으로 |
||
44 | { |
||
45 | if (scene == 3) |
||
46 | { |
||
47 | SceneManager.LoadScene(0); |
||
48 | } |
||
49 | if (scene == 4) |
||
50 | { |
||
51 | SceneManager.LoadScene(0); |
||
52 | } |
||
53 | } |
||
54 | if (Input.GetKeyDown(KeyCode.I)) //진입 |
||
55 | { |
||
56 | if (scene == 0) |
||
57 | { |
||
58 | print("다음"); |
||
59 | SceneManager.LoadScene(1); |
||
60 | } |
||
61 | if (scene == 1) |
||
62 | { |
||
63 | print("다음"); |
||
64 | SceneManager.LoadScene(2); |
||
65 | } |
||
66 | } |
||
67 | |||
68 | } |
||
69 | } |