|
@@ -8,6 +8,7 @@ public class Spirits_Cook : MonoBehaviour
|
|
|
public GameObject attributeUpEffect;
|
|
public GameObject attributeUpEffect;
|
|
|
public float reductionDegree;
|
|
public float reductionDegree;
|
|
|
public float reductionTime;
|
|
public float reductionTime;
|
|
|
|
|
+ private List<MoveCharacter> mcs = new List<MoveCharacter>();
|
|
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|
|
{
|
|
@@ -17,6 +18,7 @@ public class Spirits_Cook : MonoBehaviour
|
|
|
if (!mc.isDamageReduction)
|
|
if (!mc.isDamageReduction)
|
|
|
{
|
|
{
|
|
|
mc.DamageReductionStateOn(reductionDegree, attributeUpEffect);
|
|
mc.DamageReductionStateOn(reductionDegree, attributeUpEffect);
|
|
|
|
|
+ mcs.Add(mc);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -32,4 +34,15 @@ public class Spirits_Cook : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private void OnDisable()
|
|
|
|
|
+ {
|
|
|
|
|
+ foreach(MoveCharacter mc in mcs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!mc.isDamageReduction)
|
|
|
|
|
+ {
|
|
|
|
|
+ mc.DamageReductionStateToOff(reductionTime);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|