Browse Source

Fixed character on stage list growing indefinitely #84

master
chrisgregan 10 years ago
parent
commit
90ac088590
  1. 5
      Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs

5
Assets/Fungus/Portrait/Scripts/Commands/Portrait.cs

@ -204,7 +204,10 @@ namespace Fungus
case (DisplayType.Show): case (DisplayType.Show):
Show(character,fromPosition,toPosition); Show(character,fromPosition,toPosition);
character.state.onScreen = true; character.state.onScreen = true;
stage.charactersOnStage.Add(character); if (!stage.charactersOnStage.Contains(character))
{
stage.charactersOnStage.Add(character);
}
break; break;
case (DisplayType.Hide): case (DisplayType.Hide):
Hide(character,fromPosition,toPosition); Hide(character,fromPosition,toPosition);

Loading…
Cancel
Save