From: MegaBrutal <code+git@megabrutal.com>
Date: Sun, 16 Sep 2018 07:15:00 +0000 (+0200)
Subject: Identity notices time out
X-Git-Tag: early-release~5
X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=commitdiff_plain;h=0ed641e27ca4e7cdd8edea041dd207a1aa3fd77c

Identity notices time out

After Take ID, notices time out after 5 seconds.

	modified:   wgj58.js
---

diff --git a/wgj58.js b/wgj58.js
index b3f6ac1..d737ad8 100644
--- a/wgj58.js
+++ b/wgj58.js
@@ -160,7 +160,7 @@ class Player extends Phaser.Sprite {
 		this.loadTexture(npc.key);
 		npc.kill();
 		this.disguise = npc;
-		logic.gameinterface.dropNotice("You are now identified as " + npc.fullname + "!");
+		logic.gameinterface.dropNoticeTimeout(Phaser.Timer.SECOND * 5, "You are now identified as " + npc.fullname + "!");
 	}
 }
 
@@ -593,6 +593,11 @@ class GameInterface extends Phaser.Group {
 		this.text_notice.visible = true;
 	}
 
+	dropNoticeTimeout(timeout, text) {
+		this.dropNotice(text);
+		game.time.events.add(timeout, this.clearNotice, this);
+	}
+
 	clearNotice() {
 		this.back_notice.visible = false;
 		this.text_notice.visible = false;