From 90ac088590822b5efb8edcdfa84ce3fc415b791c Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 27 Feb 2015 12:02:51 +0000 Subject: [PATCH] Fixed character on stage list growing indefinitely #84 --- Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs b/Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs index 4a6897d5..521afcca 100644 --- a/Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs +++ b/Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs @@ -204,7 +204,10 @@ namespace Fungus case (DisplayType.Show): Show(character,fromPosition,toPosition); character.state.onScreen = true; - stage.charactersOnStage.Add(character); + if (!stage.charactersOnStage.Contains(character)) + { + stage.charactersOnStage.Add(character); + } break; case (DisplayType.Hide): Hide(character,fromPosition,toPosition);