zoukankan      html  css  js  c++  java
  • (转载)虚幻引擎3--【UnrealScript教程】章节一:7.String

    String就是C++、java等编程语言中的字符串,用双引号引起来的几个字符.如"Abc","一天".
    String类是不可变的,对String类的任何改变,都是返回一个新的String类对象。

    unrealscript中的字符串主要用来显示角色名字或者武器名字和游戏信息输出到屏幕上等等。

    字符串非常简单

    我们来定义一个字符串
    Class MyUSGame extends actor
    placeable;

    var string character;

    function postbeginplay()
    {
    `log("this is the String information:"@character);
    }


    可以看出字符串如果不赋值默认值是空的
     
    我们再来改变一下

    function postbeginplay()
    {
    character="my name is oraplayer,i'm Twenty years old,20 sui, some Symbol:~!@#$%%^&*()_=+-123456789";//随便输入
    `log("this is the String information:"@character);
    }


    可以看到字符串会原样输出字符串里面的内容
     
  • 相关阅读:
    Mac item 远程连接服务器
    搭建私人Git Server
    数据结构第三章小结
    第二章实践小结
    poj3617 Best Cow Line
    最长上升子序列问题
    Uva11450 Wedding shopping
    poj3050 hopscotch
    poj2718 Smallest Difference
    poj3669 Meteor Shower
  • 原文地址:https://www.cnblogs.com/wodehao0808/p/6104667.html
Copyright © 2011-2022 走看看