Exemplo n.º 1
0
    void HandleLureReleased(Message message)
    {
        LureReleasedMessage mess = message as LureReleasedMessage;

        GameObject NPC = mess.NPC;

        if (luredNPCs.Contains(NPC))
        {
            luredNPCs.Remove(NPC);
        }
    }
Exemplo n.º 2
0
	protected override void GameUpdate ()
	{
		base.GameUpdate ();
		if (npcCaught) {
			float currentTime = Time.time - caughtTime;
			if(currentTime >= releaseTime){
				LureReleasedMessage message = new LureReleasedMessage (this, caughtNPC);
				MessageCenter.Instance.Broadcast (message);
				npcCaught = false;
				caughtNPC = null;
			}
		}
	}
Exemplo n.º 3
0
    void lureReleaseListener(Message message)
    {
//		if (true)
//			return;
        LureReleasedMessage lureMessage = message as LureReleasedMessage;

        if (lureMessage.NPC.Equals(gameObject))
        {
            lured    = false;
            lastLure = lureMessage.Lure;
            //TODO: make getNextPath better
            nextPath = getNextPath();
        }
    }
Exemplo n.º 4
0
 protected override void GameUpdate()
 {
     base.GameUpdate();
     if (npcCaught)
     {
         float currentTime = Time.time - caughtTime;
         if (currentTime >= releaseTime)
         {
             LureReleasedMessage message = new LureReleasedMessage(this, caughtNPC);
             MessageCenter.Instance.Broadcast(message);
             npcCaught = false;
             caughtNPC = null;
         }
     }
 }