|
@@ -32,7 +32,7 @@ public class Demonic : MoveCharacter
|
|
|
public float adsorbSpeed; //八卦吸附的速度
|
|
public float adsorbSpeed; //八卦吸附的速度
|
|
|
[HideInInspector]public Vector3 adsorbTarget; //八卦胖子吸附时目标位置的X
|
|
[HideInInspector]public Vector3 adsorbTarget; //八卦胖子吸附时目标位置的X
|
|
|
private float adsorbTime; //八卦吸附中的时间
|
|
private float adsorbTime; //八卦吸附中的时间
|
|
|
-
|
|
|
|
|
|
|
+ public GameObject effectPrefab; //八卦卦象效果
|
|
|
|
|
|
|
|
private void Awake()
|
|
private void Awake()
|
|
|
{
|
|
{
|
|
@@ -539,7 +539,7 @@ public class Demonic : MoveCharacter
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case CharacterState.BaGua:
|
|
case CharacterState.BaGua:
|
|
|
- if (adsorbTime < 1)
|
|
|
|
|
|
|
+ if (adsorbTime < 0.5)
|
|
|
{
|
|
{
|
|
|
adsorbTime += Time.deltaTime * adsorbSpeed;
|
|
adsorbTime += Time.deltaTime * adsorbSpeed;
|
|
|
transform.position = Vector3.Lerp(transform.position, adsorbTarget, adsorbTime);
|
|
transform.position = Vector3.Lerp(transform.position, adsorbTarget, adsorbTime);
|
|
@@ -547,6 +547,12 @@ public class Demonic : MoveCharacter
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
transform.position = adsorbTarget;
|
|
transform.position = adsorbTarget;
|
|
|
|
|
+ if (effectPrefab != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ GameObject effect = Instantiate(effectPrefab);
|
|
|
|
|
+ effect.transform.position = transform.position;
|
|
|
|
|
+ }
|
|
|
|
|
+ gameObject.SetActive(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
break;
|