|
@@ -46,6 +46,8 @@ public class SpiritOutDoor : MonoBehaviour
|
|
|
static public int[] restPoses = new int[6] { 0, 0, 0, 0, 0, 0 };
|
|
static public int[] restPoses = new int[6] { 0, 0, 0, 0, 0, 0 };
|
|
|
public int index;
|
|
public int index;
|
|
|
|
|
|
|
|
|
|
+ private bool canSummon;
|
|
|
|
|
+
|
|
|
private void RandomSpirit()
|
|
private void RandomSpirit()
|
|
|
{
|
|
{
|
|
|
int num = spirits.Count;
|
|
int num = spirits.Count;
|
|
@@ -85,6 +87,24 @@ public class SpiritOutDoor : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
if (other.gameObject.layer == 6)
|
|
if (other.gameObject.layer == 6)
|
|
|
{
|
|
{
|
|
|
|
|
+ canSummon = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void OnTriggerExit(Collider other)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (other.gameObject.layer == 6)
|
|
|
|
|
+ {
|
|
|
|
|
+ canSummon = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void Update()
|
|
|
|
|
+ {
|
|
|
|
|
+ if (canSummon && (SpiritSystem.isXbtnDown1 || SpiritSystem.isXbtnDown2))
|
|
|
|
|
+ {
|
|
|
|
|
+ SpiritSystem.isXbtnDown1 = false;
|
|
|
|
|
+ SpiritSystem.isXbtnDown2 = false;
|
|
|
times -= 1;
|
|
times -= 1;
|
|
|
if (times >= 0)
|
|
if (times >= 0)
|
|
|
{
|
|
{
|
|
@@ -99,6 +119,7 @@ public class SpiritOutDoor : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
times = 0;
|
|
times = 0;
|
|
|
doorController.col.enabled = false;
|
|
doorController.col.enabled = false;
|
|
|
|
|
+ canSummon = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|