charactercontroller.isgrounded 是否地面

2015-1-4 10:57| 发布者: 杨炎| 查看: 1710| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: charactercontroller.isgrounded 是否地面varisgrounded: booldescription描述was the charactercontroller touching the ground during the last move?在最后的移动角色控制器是否触碰地面?c#javascriptusing unit ...

charactercontroller.isgrounded 是否地面

varisgrounded: bool

description描述

was the charactercontroller touching the ground during the last move?

在最后的移动角色控制器是否触碰地面?

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void update() {

charactercontroller controller = getcomponent();

if (controller.isgrounded)

print("we are grounded");

}

}

function update () {

var controller : charactercontroller = getcomponent(charactercontroller);

if (controller.isgrounded)

print("we are grounded");

}

文章点评