|
|
@@ -87,6 +87,20 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
return x;
|
|
|
}
|
|
|
|
|
|
+ public void ReleaseFood()
|
|
|
+ {
|
|
|
+ if (food.layer == 7)
|
|
|
+ {
|
|
|
+ Demonic dem = food.GetComponent<Demonic>();
|
|
|
+ dem.isCaughtByCook = false;
|
|
|
+ }
|
|
|
+ else if (food.layer == 6)
|
|
|
+ {
|
|
|
+ PlayerController pc = food.GetComponent<PlayerController>();
|
|
|
+ pc.isCaughtByCook = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void ToRush()
|
|
|
{
|
|
|
ChangeState(cookState.run);
|
|
|
@@ -128,14 +142,18 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
food = target.gameObject;
|
|
|
if (food.layer == 7 && !target.isDie)
|
|
|
{
|
|
|
- food.GetComponent<Demonic>().ChangeState(CharacterState.Coma);
|
|
|
+ Demonic fDem = food.GetComponent<Demonic>();
|
|
|
+ fDem.isCaughtByCook = true;
|
|
|
+ fDem.ChangeState(CharacterState.Coma);
|
|
|
//food.GetComponent<Demonic>().ChangeState(CharacterState.Die);
|
|
|
//cookKillEffect.SetActive(true);
|
|
|
ChangeState(cookState.seize);
|
|
|
}
|
|
|
else if (food.layer == 6 && !target.isDie)
|
|
|
{
|
|
|
- food.GetComponent<PlayerController>().ChangeState(CharacterState.Coma);
|
|
|
+ PlayerController fPC = food.GetComponent<PlayerController>();
|
|
|
+ fPC.isCaughtByCook = true;
|
|
|
+ fPC.ChangeState(CharacterState.Coma);
|
|
|
//food.GetComponent<PlayerController>().ChangeState(CharacterState.Die);
|
|
|
//cookKillEffect.SetActive(true);
|
|
|
ChangeState(cookState.seize);
|