Skip to content

Commit

Permalink
#4 Fixed timer bug for multiple switched door
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisas committed Apr 30, 2017
1 parent 7e2a871 commit a6efbe0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/Scripts/PrototypeDemo/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ public void DecCount()
{
if (count == pressurePlates.Length)
{
if(!setToClose)
{
closeAtTime = Time.time + timer;
}
setToClose = true;
closeAtTime = Time.time + timer;
if (m_DoorSounds != null)
m_DoorSounds.timer((int)timer);
}
Expand Down

0 comments on commit a6efbe0

Please sign in to comment.