亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

播發的時候沒有出現Happy Halloween這個字母

最后播發的時候沒有出現Happy Halloween這個字母。


using UnityEngine;

using System.Collections;


public class storyboard : MonoBehaviour {

float[]timeArray=new float[]{4,6,8,10,12};

int index;

public GameObject particle;

public GameObject bat;

public GameObject face;

public GameObject word;

// Use this for initialization

void Start () {

particle.SetActive (false);

bat.SetActive (false);

face.SetActive (false);

word.SetActive (false);

}

bool canClick;

// Update is called once per frame

void Update () {

if (index < timeArray.Length && Time.realtimeSinceStartup >= timeArray [index]) {

OnTime (index);

index++;

}

if(canClick&&Input.GetMouseButtonUp(0)){

word.SetActive(true);

}

}

void OnTime(int index)

{

Debug.Log (index);

switch(index)?

{

case 0:

{

particle.SetActive(true);

}

break;

case 1:

{

bat.SetActive(true);

}

break;

case 2:

{

face.SetActive(true);

}

break;

case 3:

{

face.GetComponent<AudioSource>().Play();

}

break;

case 4:

{

canClick=true;

}

break;

}

}

}


正在回答

舉報

0/150
提交
取消

播發的時候沒有出現Happy Halloween這個字母

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號