String用法

来源:互联网 发布:php时间戳转换年月日 编辑:程序博客网 时间:2024/05/16 06:32
private ChatMessage[] messages;

public ChatMessage(string speechText, string nameText = null, Sprite speechGiver = null) {
this.speechText = speechText;
this.nameText = nameText;
this.speechGiver = speechGiver;

}


       调用时可以:

messages = new ChatMessage[] {
new ChatMessage("You like questions, too??", "Tommy", tommySprite),                 //3个函数
new ChatMessage("Wow, we have so much in common!")                                       //1个函数
};

    

原创粉丝点击