Nebula2扩展了10个TCL命令

1 view
Skip to first unread message

fatsnake

unread,
Dec 15, 2006, 1:24:45 AM12/15/06
to 用nebula2 sdk来做游戏
new

可以根据给出的字符串参数产生对应的类型对象

delete

删除new命令产生的类型对象

sel

可以根据给出的字符串参数选择对应的类型对象,当参数为".."时表示退到上一层目录,用法有点像dos里的cd命令

psel

用于命令替换,用来保存当前路径
用法:
#保存当前路径"/"
set oldCwd [psel]
#转到"/sys/servers/gfx"目录下
sel /sys/servers/gfx
#返回"/"目录
sel $oldCwd

get

读取模型文件内容

用法:
set n [get "home:export/gfxlib/stdlight.n2"]

exit

退出当前实例

unknown

不能显示的执行,用来解释执行Nebula2扩展的函数。比如.setassign等等。只能用于微控制台

puts

输出字符串,与TCL的puts有区别,不用指定标准输出流,输出字符串用""扩起,不用{}。只能用于微控制台。

dir

显示当前目录下包函的子目录

exists

判断某个类型对象是否存在,如果存在返回1,不存在返回0
比如 exists sys/servers/gfx 返回1


有什么错误欢迎大家来指正。

Pierric

unread,
Dec 15, 2006, 8:39:52 AM12/15/06
to 用nebula2 sdk来做游戏
可以参考\code\nebula2\src\script\ntclserver_commands.cc,这里面有这些命令的实现
Reply all
Reply to author
Forward
0 new messages