protected void HandleNPCAlertMessage(Message message) { if (UseMaxNPCsPanicked) { NPCAlertLevelMessage mess = message as NPCAlertLevelMessage; switch (mess.alertLevelType) { case AlertLevelType.Panic: NPCsPanicked++; if (NPCsPanicked == MaxNPCsPanicked) { AddFail(LevelFinishedReason.MaxNPCsPanicked, mess.NPC); } break; default: break; } } }
void HandleNPCAlertLevel(Message message) { NPCAlertLevelMessage mess = message as NPCAlertLevelMessage; if (mess.alertLevelType == AlertLevelType.Alert) { streakMultiplier = 1; if (!alertedNPCs.Contains(mess.NPC)) { alertedNPCs.Add(mess.NPC); } /*if( streakMultiplier > 2 ) * { * streakMultiplier -= 2; * } * else * { * streakMultiplier = 1; * }*/ } else if (mess.alertLevelType == AlertLevelType.Panic) { streakMultiplier = 1; resetMultiplier(); if (!alertedNPCs.Contains(mess.NPC)) { alertedNPCs.Add(mess.NPC); } } else if (mess.alertLevelType == AlertLevelType.Scared) { // add lured/scared multiplier addMultiplier(scaredNPCMultiplier); } }
protected void broadcastAlertLevelChanged(AlertLevelType type) { NPCAlertLevelMessage message = new NPCAlertLevelMessage(gameObject, type); MessageCenter.Instance.Broadcast(message); }
protected void broadcastAlertLevelChanged (AlertLevelType type) { NPCAlertLevelMessage message = new NPCAlertLevelMessage (gameObject, type); MessageCenter.Instance.Broadcast (message); }