-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupdown.cs
48 lines (36 loc) · 1.67 KB
/
updown.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class updown : MonoBehaviour
{
public float speed;
void Update()
{
//누르는 동안 hold
if (
(Input.GetKeyDown(KeyCode.A) && Input.GetKeyDown(KeyCode.S))
|| (Input.GetKeyDown(KeyCode.A) && Input.GetKeyDown(KeyCode.D))
|| (Input.GetKeyDown(KeyCode.A) && Input.GetKeyDown(KeyCode.J))
|| (Input.GetKeyDown(KeyCode.A) && Input.GetKeyDown(KeyCode.K))
|| (Input.GetKeyDown(KeyCode.A) && Input.GetKeyDown(KeyCode.L))
|| (Input.GetKeyDown(KeyCode.S) && Input.GetKeyDown(KeyCode.D))
|| (Input.GetKeyDown(KeyCode.S) && Input.GetKeyDown(KeyCode.J))
|| (Input.GetKeyDown(KeyCode.S) && Input.GetKeyDown(KeyCode.K))
|| (Input.GetKeyDown(KeyCode.S) && Input.GetKeyDown(KeyCode.L))
|| (Input.GetKeyDown(KeyCode.D) && Input.GetKeyDown(KeyCode.J))
|| (Input.GetKeyDown(KeyCode.D) && Input.GetKeyDown(KeyCode.K))
|| (Input.GetKeyDown(KeyCode.D) && Input.GetKeyDown(KeyCode.L))
|| (Input.GetKeyDown(KeyCode.J) && Input.GetKeyDown(KeyCode.K))
|| (Input.GetKeyDown(KeyCode.J) && Input.GetKeyDown(KeyCode.L))
|| (Input.GetKeyDown(KeyCode.K) && Input.GetKeyDown(KeyCode.L))
)
{
// transform.position += Vector3.up;
transform.position += new Vector3(0, 0.5f, 0);
}
else
// transform.position += Vector3.down;
transform.position -= new Vector3(0, 0.01f, 0);
}
}