private void HandleDeath(Message m)
{
PlayerKilledMessage message = m as PlayerKilledMessage;
if(message.Tree == gameObject)
{
// If we are already in an axe man minigame, just destroy the new axe man
if(Active && (AxeMan != null) || (ActualAxeMan != null))
{
message.NPC.SetActive(false);
return;
}
Dead = true;
ActualAxeMan = message.NPC;
// See if the tree is already in the active state
if(/*GlobalGameStateManager.PosessionState == PosessionState.EXORCISABLE &&*/ Active)
{
if(NPC != null)
{
NPC.SetActive(true);
NPC.GetComponent<AIController>().IsTaggedByTree = true;
NPC.GetComponent<AIController>().scaredByAxeman = true;
MessageCenter.Instance.Broadcast(new PlayerReleasedNPCsMessage(new System.Collections.Generic.List<GameObject>() { NPC }));
NPC.transform.position = transform.position + new Vector3(-1f, -0.25f);
}
StartActiveAxeManMinigame();
return;
}
}
}