qq_32529103 2015-11-23 01:59 采纳率: 0%
浏览 1680

unity3d 不显示公有变量 timeLength 和nextLevel

#pragma strict

function Start () {

}

var timeLength:int =4 ;
var nextLevel:int=1 ;
private var myTime:int ;
function Update () {

myTime+=Time.deltaTime ;
if (myTime>timeLength)
Application.loadedLevel(nextLevel);

}

  • 写回答

1条回答 默认 最新

  • blue风儿 2015-11-24 06:46
    关注

    1、检查脚本有没有编译错误?2、变量前面加上public

    评论

报告相同问题?