Browse Source

Added commenter name to Comment command #84

master
chrisgregan 10 years ago
parent
commit
8bb99e1830
  1. 7
      Assets/Fungus/FungusScript/Scripts/Commands/Comment.cs

7
Assets/Fungus/FungusScript/Scripts/Commands/Comment.cs

@ -10,6 +10,9 @@ namespace Fungus
[AddComponentMenu("")] [AddComponentMenu("")]
public class Comment : Command public class Comment : Command
{ {
[Tooltip("Name of Commenter")]
public string commenterName = "";
[Tooltip("Text to display for this comment")] [Tooltip("Text to display for this comment")]
[TextArea(2,4)] [TextArea(2,4)]
public string commentText = ""; public string commentText = "";
@ -21,6 +24,10 @@ namespace Fungus
public override string GetSummary() public override string GetSummary()
{ {
if (commenterName != "")
{
return commenterName + ": " + commentText;
}
return commentText; return commentText;
} }

Loading…
Cancel
Save