コード例 #1
0
    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;
            }
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
    protected void broadcastAlertLevelChanged(AlertLevelType type)
    {
        NPCAlertLevelMessage message = new NPCAlertLevelMessage(gameObject, type);

        MessageCenter.Instance.Broadcast(message);
    }
コード例 #4
0
	protected void broadcastAlertLevelChanged (AlertLevelType type)
	{
		NPCAlertLevelMessage message = new NPCAlertLevelMessage (gameObject, type);
		MessageCenter.Instance.Broadcast (message);
	}