协同

using UnityEngine;
using System.Collections;

public class Test_1 : MonoBehaviour {

    // Use this for initialization
    IEnumerator onStart() {
        Debug.Log("--------------------------");
        AsyncOperation async = Application.LoadLevelAdditiveAsync("B");
        yield return async;
        Debug.Log("Loading complete");
    }

    
    // Update is called once per frame
    void Update () {
        if(Input.GetMouseButton(0)){
            Debug.Log("MouseDown");
            StartCoroutine(onStart());
        }
    }
    
}

 

posted @ 2013-11-14 17:39  古刹红罗  阅读(141)  评论(0编辑  收藏  举报