找回密碼
 注冊帳號

掃一掃,訪問微社區

charactercontroller.isgrounded 是否地面

2015-1-4 10:57| 發布者: 楊炎| 查看: 1838| 評論: 0|原作者: 蠻牛|來自: unity3d腳本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");

}

文章點評
女校游泳队彩金