|
@@ -11,35 +11,36 @@ public class Trans_Float : MonoBehaviour
|
|
|
public int minTime, maxTime; //±£µ×·¶Î§
|
|
public int minTime, maxTime; //±£µ×·¶Î§
|
|
|
|
|
|
|
|
public bool toFloat = false; //¹¥»÷´¥·¢Æ¯¸¡
|
|
public bool toFloat = false; //¹¥»÷´¥·¢Æ¯¸¡
|
|
|
|
|
+ private Demonic dem;
|
|
|
|
|
|
|
|
private void Start()
|
|
private void Start()
|
|
|
{
|
|
{
|
|
|
controller = GetComponentInParent<PlayerController>();
|
|
controller = GetComponentInParent<PlayerController>();
|
|
|
|
|
+ dem = GetComponent<Demonic>();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void Update()
|
|
private void Update()
|
|
|
{
|
|
{
|
|
|
if (controller.isinputJ)
|
|
if (controller.isinputJ)
|
|
|
{
|
|
{
|
|
|
- print(controller.attackToFloat);
|
|
|
|
|
controller.isinputJ = false;
|
|
controller.isinputJ = false;
|
|
|
if (isFirst)
|
|
if (isFirst)
|
|
|
{
|
|
{
|
|
|
- if (!controller.attackToFloat)
|
|
|
|
|
|
|
+ if (!dem.attackToFloat)
|
|
|
{
|
|
{
|
|
|
isFirst = false;
|
|
isFirst = false;
|
|
|
- controller.attackToFloat = true;
|
|
|
|
|
|
|
+ dem.attackToFloat = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- if (!controller.attackToFloat)
|
|
|
|
|
|
|
+ if (!dem.attackToFloat)
|
|
|
{
|
|
{
|
|
|
times += 1;
|
|
times += 1;
|
|
|
if (times >= minTime || times == maxTime)
|
|
if (times >= minTime || times == maxTime)
|
|
|
{
|
|
{
|
|
|
times = 0;
|
|
times = 0;
|
|
|
- controller.attackToFloat = true;
|
|
|
|
|
|
|
+ dem.attackToFloat = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|