-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRightLeg_J.cs
121 lines (88 loc) · 2.69 KB
/
RightLeg_J.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RightLeg_J : MonoBehaviour
{
AntMove move;
void start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.J))
{
transform.localRotation = Quaternion.Euler(-170f, 13f, 0);
}
if (Input.GetKeyUp(KeyCode.J)) //손 떼면 복구
{
transform.localRotation = Quaternion.Euler(-90.0f, 0, 0);
}
}
}
/*
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RightLeg_J : MonoBehaviour
{
AntMove move;
private float inputLate = 0.00001f;
void start()
{
}
void Update()
{
move = GameObject.Find("ant").GetComponent<AntMove>();
StartCoroutine(Rightupdown());
StartCoroutine(rightleg());
}
private IEnumerator rightleg()
{
move = GameObject.Find("ant").GetComponent<AntMove>();
float z = this.inputLate;
while (z > 0)
{
if ((move.btn[2, 0] == 1 && move.pre_move >= 0) && (move.btn[0, 1] == 1 || move.btn[1, 1] == 1 || move.btn[4, 1] == 1 || move.btn[5, 1] == 1))
{
if (Input.GetKeyDown(KeyCode.J))
{
transform.localScale = new Vector3(4.0f, 60, 2.5f);
}
}
else if ((move.btn[3, 0] == 1 && move.pre_move <= 0) && (move.btn[0, 1] == 1 || move.btn[1, 1] == 1 || move.btn[4, 1] == 1 || move.btn[5, 1] == 1))
{
if (Input.GetKeyDown(KeyCode.D))
{
transform.localScale = new Vector3(2.5f, 60, 2.5f);
}
}
else if (move.pre_move == 0)
{
transform.localScale = new Vector3(2.5f, 60, 2.5f);
}
else
{
transform.localScale = new Vector3(2.5f, 60, 2.5f);
}
z -= Time.deltaTime;
yield return null;
}
}
private IEnumerator Rightupdown()
{
float e = this.inputLate;
while (e > 0)
{
if (Input.GetKeyDown(KeyCode.J))
{
transform.localRotation = Quaternion.Euler(-120.1f, 0, 0);
}
if (Input.GetKeyUp(KeyCode.J)) //손 떼면 복구
{
transform.localRotation = Quaternion.Euler(-89.98f, 0, 0);
}
e -= Time.deltaTime;
yield return null;
}
}
}*/