- Team Member : ๋ฐ์ธ์, ์คํฌ์ฐ, ์ต์ ๋ฆผ
- Title : ์๋ฆฌ์ ์
- ๊ฐ๋ฐ ํด : Unity 3D
- ์คํ ๋ฆฌ : ์๋ฆฌ์ ๊ด๋ จ๋ 3๊ฐ์ง ๋ฏธ๋๊ฒ์์ ๋ชจ๋ ์ฑ๊ณตํด์ผ๋ง ์๋ฆฌ์ ์ ํ์ดํ์ ์ป์ ์ ์๋ ๊ฒ์
- ๋งต ๊ตฌ์ฑ :
ํ๋ฒ๊ฑฐ ๊ฒ์ | ์ค์ ์กฐํฉ ๋ง์ถ๊ธฐ ๊ฒ์ | ์ก์ฑ ๋ง๋ค๊ธฐ ๊ฒ์ |
1. ํ๋ฒ๊ฑฐ ์๊ธฐ ๊ฒ์ :
- ๋ฐฐ์ด์ ์ด์ฉํ์ฌ ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ์ฌ๋ฃ ์์๋ฅผ ์ ์ฅํ๊ณ , ์ ํด ๋์ ๋ต์ด๋ ๋น๊ตํ๋ ์ฝ๋
์ฝ๋
```C
if(Input.GetKeyDown(KeyCode.Return) // Enter
{
if(burger[0] == answer[0] && burger[1] == answer[1] && burger[2] == answer[2]
&& burger[3] == answer[4] && burger[4] == answer[5] && burger[5] == answer[5])
{
bulgogi_cnt++;
for(int i = 0 ; i < 4 ; i++)
{
burger[i] = 0;
}
}
}
```
- ์ถฉ๋ํ๋ ํ๋ฒ๊ฑฐ์ ์ฌ๋ฃ๋ฅผ ๋งจ ์๋์ ๋นต์ ์์์ผ๋ก ์ค์ ํ์ฌ ํ๋ณ ํ ํ๋ฒ๊ฑฐ์ฌ๋ฃ(์์)์ด ์ฌ๋ผ์ง๋ ์ฝ๋ ๊ตฌํ
์ฝ๋
```C
Public class Colli : MonoBehaviour
{
GameObject base bread = null ;
void Start()
{
base bread = GameObject.Find(โbase breadโ);
}
void OnCollisionEnter(Collision coll)
{
this.transform.parent = base bread.transform;
}
...
foreach(Transform child in transform)
{
GameObject.Destroy(child.gameObject);
}
//์ด๊ธฐํ
i=0;
}
```
2. Canvas๋ฅผ ์ด์ฉํ NPC ๋ํ ์ฐฝ ๋ฐ ๋ฒํผ ํด๋ฆญ ์ด๋ฒคํธ(์ฅ๋ฉด ์ ํ ๋ฑ) ์ฝ๋ ๊ตฌํ
์ฝ๋
```C
public class Dialogue
{
[TextArea]
public string dialogue;
public Sprite cg;
}
public class changeScene1 : MonoBehaviour
{
[SerializeField] private SpriteRenderer sprite_StandingCG;
[SerializeField] private SpriteRenderer sprite_DialogueBox;
[SerializeField] private Text txt_Dialogue;
private bool isDialogue = false;
private int cnt = 0;
[SerializeField] private Dialogue[] dialogue;
private void OnOff(bool _flag)
{
sprite_DialogueBox.gameObject.SetActive(_flag);
sprite_StandingCG.gameObject.SetActive(_flag);
txt_Dialogue.gameObject.SetActive(_flag);
isDialogue(_flag);
}
private void NextDialogue()
{
txt_Dialogue.text = dialogue[cnt].dialogue;
sprite_StandingCG.sprite = dialogue[cnt].cg;
cnt++;
}
private void Start()
{
cnt = 0;
isDialogue = true;
}
void Update()
{
if(isDialogue)
{
if(Input.GetKeyDown(KeyCode.Space))
{
if(cnt < dialogue.Length)
NextDialogue();
else
{
OnOff(false);
SceneManager.LoadScene(1); //์ฅ๋ฉด์ ํ
}
}
}
}
}
```
-
๋ฐฐ์ด์ ์ด์ฉํ์ฌ ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ํ๋ฒ๊ฑฐ ์ฌ๋ฃ ์์๋ฅผ ์ ์ฅํ๊ณ , ์ ๋ต ๋ ์ํผ๋ ๋น๊ตํ๋ ์ฝ๋ ๊ตฌํ
-
์ถฉ๋ํ๋ ํ๋ฒ๊ฑฐ์ ์ฌ๋ฃ๋ฅผ ๋งจ ์๋์ ๋นต์ ์์์ผ๋ก ์ค์ ํ์ฌ ํ๋ณ ํ ํ๋ฒ๊ฑฐ์ฌ๋ฃ(์์)์ด ์ฌ๋ผ์ง๋ ์ฝ๋ ๊ตฌํ
-
Canvas๋ฅผ ์ด์ฉํ NPC ๋ํ ์ฐฝ ๋ฐ ๋ฒํผ ํด๋ฆญ ์ด๋ฒคํธ ์ฝ๋ ๊ตฌํ
-
ํ๋ฒ๊ฑฐ ๊ฒ์์ ๋ถ๋ชจ-์์ ์์ ๊ธฐ
-
Main Scene ์ Character ์์ง์ ๊ตฌํ : ๊ตฌ๊ธ ์ฐธ๊ณ
-
์ก์ฑ ๋ง๋ค๊ธฐ ๊ฒ์ ๋ง์ฐ์ค ๋๋๊ทธ ๊ตฌํ : ๊ตฌ๊ธ ์ฐธ๊ณ