|
@@ -24,17 +24,15 @@ public class LockSoul : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
souls.Add(d);
|
|
souls.Add(d);
|
|
|
d.isRecorded = true;
|
|
d.isRecorded = true;
|
|
|
- nowLock++;
|
|
|
|
|
- d.ChangeState(CharacterState.LockSoul);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|
|
{
|
|
|
- if (other.gameObject.layer == 8 || other.gameObject.layer == 6)
|
|
|
|
|
|
|
+ if (other.gameObject.layer == 6)
|
|
|
{
|
|
{
|
|
|
Character c = other.GetComponentInParent<Character>();
|
|
Character c = other.GetComponentInParent<Character>();
|
|
|
- if (other.gameObject.layer == 6 && c.ls == null)
|
|
|
|
|
|
|
+ if (c.ls == null)
|
|
|
{
|
|
{
|
|
|
c.ls = this;
|
|
c.ls = this;
|
|
|
}
|
|
}
|
|
@@ -46,17 +44,21 @@ public class LockSoul : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
bool isFull = false;
|
|
bool isFull = false;
|
|
|
List<Demonic> re = new List<Demonic>();
|
|
List<Demonic> re = new List<Demonic>();
|
|
|
|
|
+ nowLock = 0;
|
|
|
foreach(Demonic d in souls)
|
|
foreach(Demonic d in souls)
|
|
|
{
|
|
{
|
|
|
if(d.isDie || !d.isInSoulTower)
|
|
if(d.isDie || !d.isInSoulTower)
|
|
|
{
|
|
{
|
|
|
re.Add(d);
|
|
re.Add(d);
|
|
|
}
|
|
}
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ nowLock++;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
foreach(Demonic d in re)
|
|
foreach(Demonic d in re)
|
|
|
{
|
|
{
|
|
|
souls.Remove(d);
|
|
souls.Remove(d);
|
|
|
- nowLock--;
|
|
|
|
|
}
|
|
}
|
|
|
if (nowLock >= maxLockSoul)
|
|
if (nowLock >= maxLockSoul)
|
|
|
{
|
|
{
|
|
@@ -67,7 +69,7 @@ public class LockSoul : MonoBehaviour
|
|
|
|
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
private void OnTriggerExit(Collider other)
|
|
|
{
|
|
{
|
|
|
- if (other.gameObject.layer == 8 || other.gameObject.layer == 6)
|
|
|
|
|
|
|
+ if (other.gameObject.layer == 6)
|
|
|
{
|
|
{
|
|
|
Character c = other.GetComponentInParent<Character>();
|
|
Character c = other.GetComponentInParent<Character>();
|
|
|
c.isInSoulTower = false;
|
|
c.isInSoulTower = false;
|