Showing
5 changed files
with
89 additions
and
5 deletions
l
0 → 100644
1 | +diff.astextplain.textconv=astextplain | ||
2 | +filter.lfs.clean=git-lfs clean -- %f | ||
3 | +filter.lfs.smudge=git-lfs smudge -- %f | ||
4 | +filter.lfs.process=git-lfs filter-process | ||
5 | +filter.lfs.required=true | ||
6 | +http.sslbackend=openssl | ||
7 | +http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt | ||
8 | +core.autocrlf=true | ||
9 | +core.fscache=true | ||
10 | +core.symlinks=false | ||
11 | +credential.helper=manager | ||
12 | +add.interactive.usebuiltin=true | ||
13 | +pull.rebase=false | ||
14 | +user.name=Dakyung Go | ||
15 | +user.email=ludkg@khu.ac.kr | ||
16 | +core.repositoryformatversion=0 | ||
17 | +core.filemode=false | ||
18 | +core.bare=false | ||
19 | +core.logallrefupdates=true | ||
20 | +core.symlinks=false | ||
21 | +core.ignorecase=true | ||
22 | +remote.origin.url=http://khuhub.khu.ac.kr/2020-1-capstone-design1/LSK_Project1.git | ||
23 | +remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* | ||
24 | +branch.master.remote=origin | ||
25 | +branch.master.merge=refs/heads/master |
... | @@ -406,7 +406,7 @@ RectTransform: | ... | @@ -406,7 +406,7 @@ RectTransform: |
406 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | 406 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
407 | m_AnchorMin: {x: 0.5, y: 0.5} | 407 | m_AnchorMin: {x: 0.5, y: 0.5} |
408 | m_AnchorMax: {x: 0.5, y: 0.5} | 408 | m_AnchorMax: {x: 0.5, y: 0.5} |
409 | - m_AnchoredPosition: {x: 130, y: 10} | 409 | + m_AnchoredPosition: {x: 195, y: 10} |
410 | m_SizeDelta: {x: 100, y: 100} | 410 | m_SizeDelta: {x: 100, y: 100} |
411 | m_Pivot: {x: 0.5, y: 0.5} | 411 | m_Pivot: {x: 0.5, y: 0.5} |
412 | --- !u!114 &485542717 | 412 | --- !u!114 &485542717 | ... | ... |
... | @@ -494,7 +494,7 @@ GameObject: | ... | @@ -494,7 +494,7 @@ GameObject: |
494 | - component: {fileID: 838204468} | 494 | - component: {fileID: 838204468} |
495 | - component: {fileID: 838204467} | 495 | - component: {fileID: 838204467} |
496 | m_Layer: 0 | 496 | m_Layer: 0 |
497 | - m_Name: 'Quad ' | 497 | + m_Name: Quad_s |
498 | m_TagString: Untagged | 498 | m_TagString: Untagged |
499 | m_Icon: {fileID: 0} | 499 | m_Icon: {fileID: 0} |
500 | m_NavMeshLayer: 0 | 500 | m_NavMeshLayer: 0 |
... | @@ -561,7 +561,7 @@ MonoBehaviour: | ... | @@ -561,7 +561,7 @@ MonoBehaviour: |
561 | m_Script: {fileID: 11500000, guid: 4381b5042657b804ba0695ce7a8c7128, type: 3} | 561 | m_Script: {fileID: 11500000, guid: 4381b5042657b804ba0695ce7a8c7128, type: 3} |
562 | m_Name: | 562 | m_Name: |
563 | m_EditorClassIdentifier: | 563 | m_EditorClassIdentifier: |
564 | - BodySrcManager: {fileID: 0} | 564 | + BodySrcManager: {fileID: 183612550} |
565 | TrackedJoint: 11 | 565 | TrackedJoint: 11 |
566 | multiplier: 200 | 566 | multiplier: 200 |
567 | --- !u!64 &838204471 | 567 | --- !u!64 &838204471 |
... | @@ -641,7 +641,7 @@ RectTransform: | ... | @@ -641,7 +641,7 @@ RectTransform: |
641 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | 641 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
642 | m_AnchorMin: {x: 0.5, y: 0.5} | 642 | m_AnchorMin: {x: 0.5, y: 0.5} |
643 | m_AnchorMax: {x: 0.5, y: 0.5} | 643 | m_AnchorMax: {x: 0.5, y: 0.5} |
644 | - m_AnchoredPosition: {x: 130, y: 0} | 644 | + m_AnchoredPosition: {x: 155, y: 0} |
645 | m_SizeDelta: {x: 100, y: 100} | 645 | m_SizeDelta: {x: 100, y: 100} |
646 | m_Pivot: {x: 0.5, y: 0.5} | 646 | m_Pivot: {x: 0.5, y: 0.5} |
647 | --- !u!1 &915514423 | 647 | --- !u!1 &915514423 | ... | ... |
... | @@ -10,13 +10,23 @@ public class ClickExercise : MonoBehaviour | ... | @@ -10,13 +10,23 @@ public class ClickExercise : MonoBehaviour |
10 | RawImage btnImage2; | 10 | RawImage btnImage2; |
11 | GameObject btnParent; //버튼들의 부모 | 11 | GameObject btnParent; //버튼들의 부모 |
12 | 12 | ||
13 | + GameObject quad; //커서 | ||
14 | + Vector3 pos; | ||
15 | + private float timer; | ||
16 | + | ||
13 | private void Start() | 17 | private void Start() |
14 | { | 18 | { |
15 | btnParent = GameObject.Find("BtnGroup").gameObject; // "부모의 이름"으로 찾습니다. | 19 | btnParent = GameObject.Find("BtnGroup").gameObject; // "부모의 이름"으로 찾습니다. |
20 | + | ||
21 | + quad = GameObject.Find("Quad_s").gameObject; | ||
22 | + pos = quad.transform.position; | ||
23 | + Debug.Log(pos); | ||
16 | } | 24 | } |
17 | 25 | ||
18 | public void GetBtn() | 26 | public void GetBtn() |
19 | { | 27 | { |
28 | + Debug.Log("GetBtn"); | ||
29 | + | ||
20 | GameObject tempBtn = EventSystem.current.currentSelectedGameObject; | 30 | GameObject tempBtn = EventSystem.current.currentSelectedGameObject; |
21 | btnImage = tempBtn.GetComponent<RawImage>(); // 해당 오브젝트의 image 컴포넌트를 받음 | 31 | btnImage = tempBtn.GetComponent<RawImage>(); // 해당 오브젝트의 image 컴포넌트를 받음 |
22 | 32 | ||
... | @@ -52,7 +62,27 @@ public class ClickExercise : MonoBehaviour | ... | @@ -52,7 +62,27 @@ public class ClickExercise : MonoBehaviour |
52 | } | 62 | } |
53 | else if (btnImage.name == "SideHiKick") | 63 | else if (btnImage.name == "SideHiKick") |
54 | { | 64 | { |
65 | + Debug.Log("SideHighKick"); | ||
66 | + btnImage.texture = Resources.Load("SideHiKick_on", typeof(Texture2D)) as Texture2D; | ||
67 | + } | ||
68 | + | ||
69 | + | ||
70 | + } | ||
71 | + | ||
72 | + void Update() | ||
73 | + { | ||
74 | + | ||
75 | + pos = quad.transform.position; | ||
76 | + Debug.Log(pos); | ||
77 | + | ||
78 | + /* | ||
79 | + if (pos.x >= 155 && pos.x <= 185 && pos.y >= 13 && pos.y <= 60) { | ||
80 | + | ||
81 | + btnImage2.texture = Resources.Load("Squat_off", typeof(Texture2D)) as Texture2D; | ||
55 | btnImage.texture = Resources.Load("SideHiKick_on", typeof(Texture2D)) as Texture2D; | 82 | btnImage.texture = Resources.Load("SideHiKick_on", typeof(Texture2D)) as Texture2D; |
83 | + btnImage2.texture = Resources.Load("Lunge_off", typeof(Texture2D)) as Texture2D; | ||
56 | } | 84 | } |
85 | + | ||
86 | + */ | ||
57 | } | 87 | } |
58 | } | 88 | } | ... | ... |
1 | using System.Collections; | 1 | using System.Collections; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using UnityEngine; | 3 | using UnityEngine; |
4 | +using UnityEngine.UI; | ||
5 | +using UnityEngine.EventSystems; | ||
4 | using UnityEngine.SceneManagement; | 6 | using UnityEngine.SceneManagement; |
5 | 7 | ||
6 | public class Title : MonoBehaviour | 8 | public class Title : MonoBehaviour |
7 | { | 9 | { |
8 | public string SceneToLoad; | 10 | public string SceneToLoad; |
9 | 11 | ||
12 | + GameObject quad; //커서 | ||
13 | + Vector3 pos; | ||
14 | + private float timer; | ||
15 | + | ||
16 | + private void Start() | ||
17 | + { | ||
18 | + Debug.Log("Start"); | ||
19 | + quad = GameObject.Find("Quad").gameObject; | ||
20 | + } | ||
21 | + | ||
10 | public void LoadGame() | 22 | public void LoadGame() |
11 | { | 23 | { |
12 | SceneManager.LoadScene(SceneToLoad); | 24 | SceneManager.LoadScene(SceneToLoad); |
13 | } | 25 | } |
14 | 26 | ||
15 | - void update() | 27 | + void Update() |
16 | { | 28 | { |
29 | + Debug.Log("Update"); | ||
30 | + | ||
31 | + pos = quad.transform.position; | ||
32 | + Debug.Log(pos); | ||
33 | + | ||
34 | + | ||
35 | + if (pos.x >= 145 && pos.x <= 195 && pos.y >= -18 && pos.y <= -10) { | ||
36 | + timer += Time.deltaTime; | ||
37 | + Debug.Log("Timer: "+ timer); | ||
38 | + | ||
39 | + if (timer > 2) { | ||
40 | + Debug.Log("Clicked"); | ||
41 | + SceneManager.LoadScene(SceneToLoad); | ||
42 | + } | ||
43 | + | ||
44 | + } | ||
45 | + | ||
17 | Debug.Log("1"); | 46 | Debug.Log("1"); |
18 | if (Input.GetMouseButtonDown(0)) | 47 | if (Input.GetMouseButtonDown(0)) |
19 | { | 48 | { | ... | ... |
-
Please register or login to post a comment